Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic Android Emulator

I'm trying to run my IONIC application in the android emulator but it gives me this error all the time !!! I set the

ANDROID_HOME=C:\Program Files\Android\Android Studio\bin,
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_111
[native-run] No hardware devices found, attempting emulator...
[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.
[ERROR] An error occurred while running subprocess native-run.

        native-run.cmd android --app platforms\android\app\build\outputs\apk\debug\app-d... exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.


like image 437
wahib Avatar asked Jul 22 '19 09:07

wahib


2 Answers

I have the same problem and then I started Android Studio and run the emulator.

With the emulator running, I executed:

ionic cordova emulate android

And it works for me :)

like image 76
Ale Prieto Avatar answered Sep 18 '22 08:09

Ale Prieto


Try running

--no-native-run

if it not resolved install native run globally

npm i -g native-run
like image 28
Chanaka Weerasinghe Avatar answered Sep 17 '22 08:09

Chanaka Weerasinghe