After a great deal of searchings, I'm can't solve this error when I run:
ionc cordova run android -ls
OUTPUT:
ANDROID_HOME=/Users/lucianokrebs/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home
No target specified and no devices found, deploying to emulator
No emulator specified, defaulting to Nexus_5_API_P
Waiting for emulator to start...
PANIC: Missing emulator engine program for 'x86' CPU.
And the emulator never starts
Also, when I run:
$ ${ANDROID_SDK_ROOT}/tools/emulator -avd my-custom-avd
I got:
PANIC: Missing emulator engine program for 'x86' CPU.
But, when I run:
$ ${ANDROID_SDK_ROOT}/emulator/emulator -avd my-custom-avd
the emulator starts and works fine
Seems that the cordova
set the wrong path when they try to starts the emulator. Someone already deal with that?
ionic info:
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.0.0 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Node : v8.9.4
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 9.3 Build version 9E145
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
p.s: when I run ionic cordova build android
its also works fine
From SDK tools version 25.3.0 onwards, the emulator has been removed and moved to ../sdk/emulator
.
Just set ${ANDROID_SDK_ROOT}/emulator
to your $Path
variable so that emulator
can be called from the command line and ionic cordova will detect the emulator.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With