ionic cordova emulate android
command worked fine until i deleted the old android emulator and created new one
now emulate command not able to detect the new android emulator
what it the solution?
Error: Cannot read property ‘replace’ of undefined
[ERROR] An error occurred while running cordova run android (exit code 1)
What is your ionic info
output?
Try giving the emulator a “simpler” name (no spaces, not non-A-Z characters)
@ionic/cli-utils : 1.8.1
ionic (Ionic CLI) : 3.8.1
global packages:
Cordova CLI : 7.0.1
Gulp CLI : CLI version 3.9.1 Local version 3.9.1
local packages:
@ionic/app-scripts : 1.3.7
Cordova Platforms : android 6.2.3 browser 4.1.0 ios 4.4.0
Ionic Framework : ionic-angular 2.3.0
System:
Android SDK Tools : 26.0.2
Node : v6.11.2
npm : 3.10.10
OS : Linux 4.4
Cordova is up to date.
Try ionic cordova emulate android --list
please.
cordova run android --list --emulator
Available android virtual devices:
Nexus_6P_API_26
That is the one that you just added?
Use --target
to start emulation with this one explicitly:
i used
ionic cordova run android --target Nexus_6P_API_26
it worked
Thank you
3 Likes