Box with box with ion box - set your Android target: "android-22"

I have been using the latest ion box since April 27, 2015. I was able to ionic platform add android , but got the following error if 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 tried updating sdk with the following command

 android update sdk --no-ui 

where I get the output of the selection from the number https://dl-ssl.google.com/android * "The file was not found. However, if I copy this URL and paste it into the browser, the file is.

My firewall is now connected to the network to have direct access to the Internet, as NAT gave me the same errors.

Any help is greatly appreciated.

+5
source share
3 answers

Follow these steps. 1) Enter the android command on the command line (make sure ANDROID_HOME and PATH are installed correctly)
2) Select API 22 from the list. 3) Click "Install packages."
4) Enter the android avd command at the command prompt.
5) Set the API level and other configuration.
6) Now enter the android ion collection.

+9
source

I will get around this by changing https to http or vise versa in the settings, but as a quick fix to support the andorid 21 API, as @astroanu said, this will help. he will add API 21 support to the project.

 $ cordova platforms remove android $ cordova platforms add android@3.7.1 
+3
source

I managed to build android apk by following these steps:

  • Open the SDK manager after downloading / installing the android SDK (android studio). AndroidStuido> Appearance and behavior> System Settings> Android SKD. Alternatively, you can simply click the SDK Manager button in the Welcome to Android-Studio window that appears when you open Android Studio.
  • In the SDK Platforms, click on Android 5.1.1 - API Level 22 and click to apply the package.
+2
source

All Articles