-1

I shifted development of my ionic app from windows to ubuntu 14.04 now. I installed everything new. "Ionic build android" command is working but when i run "ionic run android" or "ionic emulate android" it only starts emulator no BUILD SUCCESS and LAUNCH SUCCESS is shown in console. Also app does not get installed in emulator.

ajeet@samsung:~/deployments/mobile_app/chmapp$ ionic run android
Native thread-sleep not available.
This will result in much slower performance, but it will still work.
You should re-install spawn-sync or upgrade to the lastest version of node if possible.
Check /usr/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/cross-spawn/node_modules/spawn-sync/error.log for more details
Running command: /home/ajeet/deployments/mobile_app/chmapp/hooks/after_prepare/010_add_platform_class.js /home/ajeet/deployments/mobile_app/chmapp
add to body class: platform-android
ANDROID_HOME=/opt/android-sdk
JAVA_HOME=/usr/lib/jvm/default-java
No target specified, deploying to emulator
No emulator specified, defaulting to Nexus
Waiting for emulator...
sh: 1: glxinfo: not found
sh: 1: glxinfo: not found
emulator: WARNING: VM heap size set below hardware specified minimum of 256MB
emulator: WARNING: Setting VM heap size to 512MB
console on port 5554, ADB on port 5555
Ajeet Lakhani
  • 3,768
  • 2
  • 22
  • 37

3 Answers3

1

As discussed in comments.

Keep the emulator running first and then execute. Invoking the emulator at runtime often leads to timeout.

Viral Patel
  • 32,418
  • 18
  • 82
  • 110
  • One more question , i just tried ionic tabs sample. Built apk is working in real android device but now in emulator its show "Unfortunately, app_name has stopped". When does it happen ? – Ajeet Lakhani Jul 15 '16 at 05:34
  • No error in the console. Only warning while starting emulator `emulator: WARNING: VM heap size set below hardware specified minimum of 256MB emulator: WARNING: Setting VM heap size to 512MB`. When i run ionic run command, app just starts and close with "Unfortunately, app_name has stopped" alert while its working on real android device. – Ajeet Lakhani Jul 15 '16 at 05:47
  • that's a different issue but see if this helps : http://stackoverflow.com/questions/38113166/is-this-an-error-in-launching-the-avd-android-studio-emulator-warning-vm-heap?noredirect=1&lq=1 – Viral Patel Jul 15 '16 at 05:57
0

Run this command, it will show the missing things npm list would shows you need "try-thread-sleep" to use spawn-sync. So, add bellow in your "package.json" and "npm install" again. "try-thread-sleep": "^1.0.0". Hope it will help. copied.

Deepika
  • 460
  • 5
  • 20
-1

you need to install emulator in Ubuntu then only you can able to see the output in emulator

Manoj Rejinthala
  • 530
  • 1
  • 6
  • 22