2016-11-18 112 views
0

我想在我的OSX上運行android的phonegap應用程序。 當我嘗試運行通過CLI的PhoneGap我得到這個在mac上運行android模擬器

No target specified and no devices found, deploying to emulator 


Error: No emulator images (avds) found. 
1. Download desired System Image by running: /Users/susanne/Documents/roger/02_Onni/09_development/application/android-sdk-macosx/tools/android sdk 
2. Create an AVD by running: /Users/susanne/Documents/roger/02_Onni/09_development/application/android-sdk-macosx/tools/android avd 
HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver 

我沒有做過1,但我不能找到「Android的AVD」文件中的號碼2也提到了,即使我連接Android設備它找不到它。

如果有人能幫上忙,我會非常高興。這可能不是一個phonegap特定的問題,而是一個Android問題。

回答

0

這個問題是因爲你沒有創建設備。所以你必須先在android sdk中創建設備。

要創建android設備,您必須首先安裝avd。 我有一些截圖希望能幫到你。

  1. 準備好您的Android API這樣enter image description here

  2. 然後去工具 - >管理AVDS: enter image description here

  3. 在我來說,我已經建立2臺設備了。去創建:

enter image description here

你想在這裏哪一種設備的
  • ,然後添加規範的理解啞:
  • enter image description here

    單擊確定,您的設備將被創建。然後再運行你的應用程序。

    謝謝。

    +0

    我在哪裏可以看到圖片中的第2步?我已經完成了第一步。步驟2圖片我無法找到工具>管理 – suMi

    +0

    轉到菜單 - >工具 - >管理avds。您可以在頂部找到菜單欄。 –