Yesterday I was having a big problem with the installation of the ‘Android SDK’ in Mac, and this because NativeScript did not detect it, but after a lot of reinstallations I got it, I do not know if there is another possible solution but I want to share my experience.
Basically my problem was that the command " android " is deprecated and in the NativeScript documentation have the following command for install the sdk and extras:
android update sdk --filter tools,platform-tools,android-25,build-tools-25.0.2,extra-android-m2repository,extra-google-m2repository,extra-android-support --all --no-ui
Then I read this…
Select all packages for the Android 22 SDK, Android SDK Build-tools 23.0.3 or later, Local Maven repository for Support Libraries (under Extras) and any other SDKs that you want to install and click Install. You can alternatively use the following command, which will install all required tools:
So… my problem started with a deprecated command, and for that reason I couldn’t start the SDK Manager either or I couldn’t found a way to run it…
But well after a lot of tries I did the following steps:
1- Run the command:
brew cask install android-sdk
2- Run the following command to find the path of the android-sdk
brew cask info android-sdk
3- At the end of the response you will see something like this:
You may want to add to your profile:
And then you should add that line to your .bash_profile (If you can’t find the file it just create a new file .bash_profile and add the line)
After this close and open again the terminal.
3- Install Android Studio
Android Studio > Preferences > Appearance & Behavior > System settings > Android SDK
Change the Android SDK Location to:
And now you can choose the sdk and extras that you need to use.
After these steps open the terminal and run
And now is detecting the SDK!