lwinkyawmyat
lwinkyawmyat

Reputation: 1242

Why isn't my Android app working when I test it on a real device?

I'm building an Android app with Ionic Framework, and am trying to run it on a real device with USB debugging, like in these tutorials:

http://www.neilberry.com/how-to-run-your-ionic-app-on-real-devices/?s=2015-08-24-how-to-run-your-ionic-app-on-real-devices

http://junerockwell.com/how-to-run-ionic-on-real-devices/

Step-1

$ ionic platform add android

$ ionic build android

After adding the Android platform and building an APK with the above commands, it works correctly with no error. So, I try the next step:

Step-2

I connected device and PC via Debugging mode to run android devices. I ran the command ionic run android. I get the below error messageL

$ ionic run android

ANDROID_HOME=C:\Android\sdk JAVA_HOME=C:\Program Files\java\jdk1.8.0_25 WARNING : No target specified, deploying to emulator WARNING : no emulator specified, defaulting to Nexus_5_API_23_x86 Waiting for emulator... emulator: ERROR: x86 emulation currently requires hardware acceleration! Please ensure Intel HAXM is properly installed and usable. CPU acceleration status: HAX kernel module is not installed!

How can I solve this problem?

List of my ionic info:

$ ionic info

Your system information: Cordova CLI: 5.4.1 Gulp version: CLI version 3.9.0 Gulp local: Local version 3.9.0 Ionic Version: 1.2.4 Ionic CLI Version: 1.7.13 Ionic App Lib Version: 0.6.5 OS: Windows 8.1 Node Version: v4.2.4

Upvotes: 0

Views: 3417

Answers (3)

lwinkyawmyat
lwinkyawmyat

Reputation: 1242

This error isn't related to ionic frameworks because HAXM installer isn't installed on Android SDK Manager.

This question already has an answer here: Error in launching AVD with AMD processor.

Upvotes: 0

user276648
user276648

Reputation: 6393

Maybe you can try running adb start-server. I know I need to do this first before being able to see my device in chrome://inspect/#devices. You of course need adb which probably comes from the Android SDK.

Upvotes: 1

Joerg
Joerg

Reputation: 3101

I don't use ionic, I use cordova. In cordova you call the emulator by:

cordova emulate android 

and to run the app on a device:

cordova run android --device

Maybe you try:

ionic run android --device

Upvotes: 1

Related Questions