Problem when building the project on Android

Asked

Viewed 376 times

0

I’m trying to build on a project made in Ionic for android, but it turns me the following error:

cordova build android
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\Lucas\Documents\Projects\primeiro\hooks\after_prepare\010_add_platform_class.js C:\Users\Lucas\Documents\Projects\primeiro
add to body class: platform-android
Running command: cmd "/s /c "C:\Users\Lucas\Documents\Projects\primeiro\platforms\android\cordova\build.bat""
[Error: Please install Android target: "android-22".

Hint: Open the SDK manager by running: C:\Users\Lucas\AppData\Local\Android\android-sdk\tools\android.BAT
You will require:
1. "SDK Platform" for android-22
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)]
ERROR building one of the platforms: Error: cmd: Command failed with exit code 2
You may not have the required environment or OS to build this project
**Error: cmd: Command failed with exit code 2**

Android SDK is installed, follows a picture of it:

inserir a descrição da imagem aqui

I can’t understand why this is happening. I have already installed the sdk, set the variable ANDROID_HOME and PATH, and even then it remains in the same message. Thanks in advance.

1 answer

1


By the description of the error, is missing the download of API level 22 (Android 5.1.1).

  • Man at the time I read this laughed, on morale. How dumb I am, I was confusing Android 2.0 with API level 22, that tapir. Thanks for the reply. I will install here and I already give an answer.

  • All right! : D @SCOFIELD

  • Ready. Thank you again.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.