尝试使用以下方法在我的Mac 10.14.2
上模拟Android设备:
export ANDROID_HOME=/Users/me/Library/Android/sdk
export ANDROID_SDK_ROOT=/Users/me/Library/Android/sdk
export ANDROID_AVD_HOME=/Users/me/.android/avd
ionic cordova run --confirm --no-interactive --emulator android
但是失败了:
PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value [/Users/me/Library/Android/sdk]!
所有指定的路径实际上是安装后的默认路径。我什么都没改变。 system-images
包含我通过android studio安装的5个android版本的图像。
sdk $ l /Users/me/Library/Android/sdk
build-tools/ extras/ licenses/ platform-tools/ sources/ tools/
emulator/ fonts/ patcher/ platforms/ system-images/
sdk $ l system-images/
android-23/ android-24/ android-25/ android-26/ android-27/ android-28/
关于如何正确修复失败的构建的任何建议?
ionic info
Ionic:
ionic (Ionic CLI) : 4.5.0 (/Users/me/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.0
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 1.1.1, (and 9 other plugins)
System:
ios-deploy : 1.9.4
NodeJS : v11.4.0 (/Users/me/.nvm/versions/node/v11.4.0/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61