I have run into problems when trying to test my app en Android. I hope that you guys can give me a helping hand.
When I have tried to test on a device from Ionic Box:
I started by typing
adb devices
The list is empty even though I have a phone connected to my computer which as far as I understand is also in debugger mode. How do I get my device to list? My guess is that perhaps the phone is not connected to the virtual machine. I have tried some googled ideas, but have not succeeded to get my phone listed.
When I have tried to emulate a device in Ionic Box:
I get the following error message
vagrant@ionic-android:/vagrant/mobileionic$ ionic emulate android
Downloading cordova library for android…
Download complete
add to body class: platform-android
Running command: /vagrant/novamobileionic/platforms/android/cordova/run --emulator
ERROR: Error: Please install Android target: “android-22”.
Hint: Open the SDK manager by running: /home/vagrant/android-sdk-linux/tools/android
You will require:
“SDK Platform” for android-22
"Android SDK Platform-tools (latest)
“Android SDK Build-tools” (latest)
Error: /vagrant/novamobileionic/platforms/android/cordova/run: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
I wold be grateful if you can help me get going with either approach.
I’ve tried getting Android testing running on both Windows and Linux, all in all probably for 10 hours and have not succeeded yet. Do you have some kind of a detailed guide for dummies?
After I executed vagrant destroy, vagrant up and then ran ionic emulate android I got a different error message:
vagrant@ionic-android:/vagrant/mobileionic$ ionic emulate android
: No such file or directory
Hook failed with error code 127: /vagrant/novamobileionic/hooks/after_prepare/010_add_platform_class.js
I am also trying to create a box from scratch. I will see which path comes to success first. I have gotten Ionic up and running by performing the following:
But I haven’t understood how to get Android up and running.
I would appreciate help on how to move forward with either. My goal is to be able to build an Android app so that I can copy it to my phone and test it there. I tried my app on Ionic View and got the white screen of death, so I need to test my app with debugging tools.