NativeScript Installation Error (windows)


I have a problem completing NativeScript installation requirement. I got stuck at number 5 in the installation guide available here.

When i run the command “tns doctor” in the command prompt, i get the error message below:

Cannot find a compatible Android SDK for compilation. To be able to build for An droid, install Android SDK 22 or later. Run $ %ANDROID_HOME%\tools\android to manage your Android SDK versions.

You need to have the Android SDK Build-tools installed on your system. You can i nstall any version in the following range: ‘>=23 <=27’. Run $ %ANDROID_HOME%\tools\android from your command-line to install required An droid Build Tools.

You need to have Android SDK 22 or later and the latest Android Support Reposito ry installed on your system. Run $ %ANDROID_HOME%\tools\android to manage the Android Support Repository.

I have installed the required sdk and i am still getting the same error message and every time i execute this script in the console, it takes like forever to complete:

“%ANDROID_HOME%\tools\bin\sdkmanager” “tools” “platform-tools” “platforms;android-25” “build-tools;25.0.2” “extras;android;m2repository” “extras;google;m2repository”


It could just be that the PATH variables aren’t set in Windows. Take a look at these instructions for how to verify that.


Open cmd with admin permissions and type

setx -m ANDROID_HOME “sdk/path/here”