2021年3月16日 星期二

No targets devices/emulators available. 使用模擬器出現異常,無法使用

指令:ionic cordova emulate android 

異常訊息:

[native-run] ERR_NO_TARGET: No targets devices/emulators available. Cannot create AVD because there is no suitable API installation. Use --sdk-info to reveal missing packages and other issues.


avdmanager list avd    --列出所有系統中所有的AVD    

(環境變數中要有 %ANDROID_HOME%\tools\bin 才可以執行)


avdmanager list target --列出目標的AVD


C:\Users\morse>avdmanager list target

Available Android targets:==============] 100% Fetch remote repository...

----------

id: 1 or "android-19"

Name: Android API 19

Type: Platform

API level: 19

Revision: 4

----------

id: 2 or "android-28"

Name: Android API 28

Type: Platform

API level: 28

Revision: 6

----------

id: 3 or "android-29"

Name: Android API 29

Type: Platform

API level: 29

Revision: 4

ionic指定模擬器:

手機

ionic cordova emulate android --target=Nexus_5X_API_26_x86

ionic cordova emulate android --target=Nexus_5X_API_26_x86 --verbose

ionic cordova emulate android --target=Nexus_5X_API_26_x86 --warning-mode all

平板

ionic cordova emulate android --target=Nexus_9_API_27


SDK 管理工具

sdkmanager --install "system-images;android-29;default;x86"


沒有留言:

張貼留言

[Q&A] Send image from ionic to asp.net core (IFormFile) web api

 [Q] We are looking to upload image from ionic to .net core web api. To achieve this we are using file transfer plugin. So, far we understoo...