I am having one cordova application made in ionic framework i want to test it in emulator som fired command ionic emulate android
and it threw following error
Error coming on Git Bash command prompt while running command ionic emulate android.
Error:
c:\Users\work\biziHiveMobile\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
ERROR : No emulator images (avds) found.
1. Download desired System Image by running: c:\Users\work\AppData\Local\Android\android-sdk\tools\android.BAT sdk
2. Create an AVD by running: c:\Users\work\AppData\Local\Android\android-sdk\tools\android.BAT avd
HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver
Error: c:\Users\work\biziHiveMobile\platforms\android\cordova\run.bat: Command failed with exit code 1
at ChildProcess.whenDone (c:\Users\work\AppData\Roaming \npm\node_modules\cor
dova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
This error is coming on windows 8 PC. I have updated my android SDK to latest version. I have also added emulator accelerator into it from extras of android sdk. STill this error is coming. Anyone knows how to resolve it on windows PC
In your terminal try run android avd
Create your emulator and try ionic emulate android
again
Just before running the command sudo ionic emulate android
go to the Android Studio open the AVD Manager then create AVD(if not yet created) and launch it in the emulator.
Now execute the command sudo ionic emulate android
it will run correctly
First of all create the emulator image:
Go to tools folder, i.e: "C:\Users\MyUser\AppData\Local\Android\sdk\tools"
The command is:
android create avd --name thename -k "system-images;android-25;google_apis;x86"
Then emulate:
ionic cordova emulate android
**Make sure to have HAXM accelerator installed: "C:\Users\Myuser\AppData\Local\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager"
Update for mac users using macOS Sierra 10.12.6 and Android Studio for Mac 2.3.3
Context
I got this problem not only in Windows, also in Mac.
This happens when you install the new Android Studio and never created a device and you are trying to run from a terminal. You can get something similar to this:
Example for cordova,
cordova emulate android
...
BUILD SUCCESSFUL
Total time: 1.039 secs Built the following apk(s): /Users/mtro.josevalerio/WebstormProjects/template/platforms/android/build/outputs/apk/android-debug.apk ANDROID_HOME=/Users/mtro.josevalerio/Library/Android/sdk JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home Error: No emulator images (avds) found. 1. Download desired System Image by running: /Users/mtro.josevalerio/Library/Android/sdk/tools/android sdk 2. Create an AVD by running: /Users/mtro.josevalerio/Library/Android/sdk/tools/android avd HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver
Options:
- You can try to fix it running the commands manually. (hard to do)
- Starting Android Studio
Tools > Android > Avd Manager
- Create Virtual Device Pick one device from the list "Nexus 5" Click "Download" Wait till the installation finish. Pick a name for this devices, "Accept the default" Done. You will have at least on device installed
"Do not forget to check the API version of the device", if you are developing on 23 you can get errors trying to run on a newer device running with 25 and up."
If you can't find the avd manager, go to Help -> Find Action -> avd and click on AVD Manager.
1) In your command promtp write and enter -android avd-
2) Create your emulator
3) Try -ionic emulate android-
1) Follow the instructions on the error message by typing: "c:\Users\work\AppData\Local\Android\android-sdk\tools\android.BAT" avd
2) Create an AVD. (The AVD manager should pop out)
3) Try ionic emulate android
Download and install android studio, go to tools and then avd manager. For more information you can check the documentation.
Just download the Android Studio and create a virtual machine from there. And run the same command(ionic emulate android
). Everything should work fine if you do this.
To run it on android device connect the device and run ionic run android
来源:https://stackoverflow.com/questions/30682523/error-no-emulator-images-avds-found-thrown-on-windows-8-while-opening-emulat