Skip to content Skip to sidebar Skip to footer

Cannot Find A Compatible Android Sdk For Compilation When Running `tns Platform Add Android`

I am following an official NativeScript tutorial and having a problem configuring my OS X environment for android development. When running tns platform add android I receive the f

Solution 1:

Alright, so you need to make sure of following:

  • Make sure you have API 22 installed.
  • Make sure you you have Android SDK Build Tools 22.x.x installed. (Yes, specifically 22.x.x)
  • Make sure you have Android support repository installed. (You can find it under Extras section in Android SDK Manager)

Once you have performed steps mentioned above, run tns doctor again and you should see No issues were detected message.

Solution 2:

This is because of sudo. The root user has no ANDROID_HOME set.

Solution 3:

For Windows User:

  1. Run 'android update sdk' from command line
  2. Select Android 5.1.1(API22)
  3. Select Tools folder
  4. Select Extras and click on Install.

ps:- adding this answer, so that if any one land on this page can see it.

Solution 4:

  1. Check the ANDROID_HOME is ok
  2. Install the API 22 + ion the Extras > Android Support Repository
  3. Run the following

    • tns platform remove android
    • tns platform add android@next
  4. Run

    tns run android

then it should be OK

Solution 5:

I solve this problem installing Android Support Repository from Extras.

Post a Comment for "Cannot Find A Compatible Android Sdk For Compilation When Running `tns Platform Add Android`"