Ionic-box vagrant box - Install Android target: “android-22”


#1

I’m using the latest ionic-box as of 27th April 2015 and running it on a centos 7 box. I’ve been able to “ionic platform add android” but getting the following error when “ionic build android”:

[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)]

I’ve tried updating the sdk with the following command “android update sdk --no-ui” where I get the output of fetching a number of “https://dl-ssl.google.com/android*” File not found. However, if i copy that url and paste it on a browser the file is there.

My vagrant box is now bridged on the network to have direct access to the internet, since NAT was giving me the same errors. I have also created a separate ionic-box with a a dummy ionic framework project “myApp” tabs, error is the same.

Any help is much appreciated.


#2

Finally fixed, in case others come across the same issue. I managed to get the android sdk updated by “su root” and running the following command.

“/home/vagrant/android-sdk-linux/tools/android update sdk -u -a -t 22”

Note: this was performed on the vagrant box itself.


#3

i had the same error you got, and my update game similar errors.

I tried what you did, and the SDK seemed to update fine… i went back to build but got the same error as before even though I updated android…

thought?


#4

Have you tried running it as “su” ?