Have installed ionic box and logged in to the machine. Now what?

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:

  1. “SDK Platform” for android-22
  2. "Android SDK Platform-tools (latest)
  3. “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.

follow the hint. The sdk-version is too old so open the android sdk tools --> select the suggested version and install it.

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

could you run the following commands in the box “ionic -v”, “noce -v”, “cordova -v”?

maybe all dependencies are outdated

10hrs Oo … in that time you can setup up your own vagrant vm^^ 100times

ionic -v
v1.1.10

node -v
v0.10.25

cordova -v
3.5.0-0.2.7

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:

To get Ionic up and running (successful)
sudo apt-get update
sudo apt-get install nodejs
sudo npm install -g cordova
sudo npm install -g bower
sudo npm install -g gulp
npm install -g nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
nvm install 0.12
sudo apt-get install nodejs-legacy
sudo npm install -g ionic

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.

i would use node version 4.2.2. and not 0.12.7

and oyu need to install android sdk and java jdk.

After that you need to set the correct env variables JAVA_HOME and ANDROID_HOME --> pointing to the install directories of both. thats it.

There are many other tutorials in the web how installing android sdk and java sdk and setting the path variables.