Issues with advanced installation guide [Android SDK]


#1

Hello!

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:
‘export ANDROID_HOME=/usr/local/share/android-sdk’

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)

export ANDROID_HOME=/usr/local/share/android-sdk

After this close and open again the terminal.

3- Install Android Studio

Go to:

Android Studio > Preferences > Appearance & Behavior > System settings > Android SDK

Change the Android SDK Location to:

/usr/local/share/android-sdk

And now you can choose the sdk and extras that you need to use.

After these steps open the terminal and run

tns doctor

And now is detecting the SDK!


#2

Thanks for posting this as I ran into this same issue today. I’m still unable to get an emulator running though and wonder if you have any insights to that? The instructions mention going to Tools > Android > AVD Manager, but I don’t see anything like that under Tools. I’ll keep trying and post if I have any update!

Julie


#3

As an alternative you could use Genymotion Android emulators. I have found them to be faster for me on Windows OS.


#4

Hello Julie,

The guide doesn’t explain how to configure the Emulator but as Pete said, you could use Genymotion Android!

For future help with the SDK configuration, I leave the following images!

1 - Click on preferences:

2- Then:

Second image


#5

Yep I had gotten that far, but was unable to find the AVD manager anywhere. I ended up creating a bogus app and then found the AVD manager and was able to add emulators. Thanks for the suggestions!!