You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The Android SDK isn't installed or it's not configured properly #3585
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
✖ WARNING: adb from the Android SDK is not installed or is not configured properly.
For Android-related operations, the NativeScript CLI will use a built-in version of adb.
To avoid possible issues with the native Android emulator, Genymotion or connected
Android devices, verify that you have installed the latest Android SDK and
its dependencies as described in http://developer.android.com/sdk/index.html#Requirements
✖ WARNING: The Android SDK is not installed or is not configured properly.
You will not be able to run your apps in the native emulator. To be able to run apps
in the native Android emulator, verify that you have installed the latest Android SDK
and its dependencies as described in http://developer.android.com/sdk/index.html
It seems your adb is not included in $PATH. {N} CLI tries to execute $ANDROID_HOME\platform-tools\adb to check if adb is correctly setup. To check it on your side, just execute adb from command line.
@Fatme Thank you but it didn't help and I just found out another problem: NS seems not to recognize the ANDROID_HOME variable set int .bashrc, because as soon as I restart the computer and run tns doctor it tells me the variable isn't set, but it in fact is, since I get this output bash: /home/pierre/android/sdk/: Is a directory when I run $ANDROID_HOME
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
✖ WARNING: adb from the Android SDK is not installed or is not configured properly.
For Android-related operations, the NativeScript CLI will use a built-in version of adb.
To avoid possible issues with the native Android emulator, Genymotion or connected
Android devices, verify that you have installed the latest Android SDK and
its dependencies as described in http://developer.android.com/sdk/index.html#Requirements
✖ WARNING: The Android SDK is not installed or is not configured properly.
You will not be able to run your apps in the native emulator. To be able to run apps
in the native Android emulator, verify that you have installed the latest Android SDK
and its dependencies as described in http://developer.android.com/sdk/index.html#Requirements
$ANDROID_HOME: bash: /home/pierre/android/sdk/: Is a directory
echo $ANDROID_HOME && tns doctor:
/home/pierre/android/sdk/
✔ Getting environment information
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
✖ WARNING: adb from the Android SDK is not installed or is not configured properly.
For Android-related operations, the NativeScript CLI will use a built-in version of adb.
To avoid possible issues with the native Android emulator, Genymotion or connected
Android devices, verify that you have installed the latest Android SDK and
its dependencies as described in http://developer.android.com/sdk/index.html#Requirements
✖ WARNING: The Android SDK is not installed or is not configured properly.
You will not be able to run your apps in the native emulator. To be able to run apps
in the native Android emulator, verify that you have installed the latest Android SDK
and its dependencies as described in http://developer.android.com/sdk/index.html#Requirements
There seem to be issues with your configuration.
✔ Getting NativeScript components versions information...
✔ Component nativescript has 4.0.1 version and is up to date.
✔ Component tns-core-modules has 4.0.0 version and is up to date.
✖ Component tns-android is not installed.
✖ Component tns-ios is not installed.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
✖ WARNING: adb from the Android SDK is not installed or is not configured properly.
For Android-related operations, the NativeScript CLI will use a built-in version of adb.
To avoid possible issues with the native Android emulator, Genymotion or connected
Android devices, verify that you have installed the latest Android SDK and
its dependencies as described in http://developer.android.com/sdk/index.html#Requirements
✖ WARNING: The Android SDK is not installed or is not configured properly.
You will not be able to run your apps in the native emulator. To be able to run apps
in the native Android emulator, verify that you have installed the latest Android SDK
and its dependencies as described in http://developer.android.com/sdk/index.html#Requirements
I've noticed your $PATH has /home/pierre/android/sdk/tools but it seems you need /home/pierre/android/sdk/tools/bin. Not sure this will resolve your issue but can you please try it:
export PATH=$PATH:$ANDROID_HOME/tools/bin
After that can you please execute
adb && tns doctor
Reacted by Ndi-Tah Samweld, Thiago da Silva Pereira and arLevi
We discussed your problem and actually there are 2 scenarios that might cause this issue.
The first one is in case when android sdk is not fully installed or configured. To verify it, can you please execute
ls -la $ANDROID_HOME/platform-tools/adb
The second one is in case when adb server is already running. If this is the case, you need to kill the server. You can use the following:
@Fatme I think it was probably because I was using Linux 32-bit and google doesn't support this architecture but I didn't know that. But now I'm using a 64-bit Debian and I can't even install the required runtime libraries, so I'm definitely giving up on NS and moving to React Native. Thanks for your help.
Reacted by linoman, Miroslav Maksimovic, Leonardo and Jose F. Lopez
Hey @pierremacedo,
My name is Rosen Vladimirov and I'm working on NativeScript since its beginning. I'm sorry to hear you have faced issues with the environment configuration and this led you to the decision to stop using the technology. In fact configuring the environment for both iOS and Android builds is not an easy task and as you have seen, we are still struggling with different issues on this side. However, the technology itself, the NativeScript framework, is really powerful. I'm not sure if you were able to give it a try, so I would like to suggest you to take a look at the following resources, which could give you another way to try NativeScript:
NativeScript Playground: https://play.nativescript.org - the Playground allows you to try the NativeScript framework with a minimum efforts. You have to download the required application from AppStore (PlayStore) and scan a QR code to deploy your app. In fact NativeScript Playground is the easiest and fastest way to try the technology itself.
NativeScript Sidekick: https://www.nativescript.org/nativescript-sidekick - This Desktop application allows you to create, build and run NativeScript applications without any local configuration. The only requirements are to have NativeScript CLI installed and to have a Telerik account. NativeScript Sidekick allows you to use cloud builds (you have 100 free cloud builds each month) and local builds in case your local environment is setup.
Once again I'm sorry to hear you have faced issues with the configuration. We'll be glad to assist you further in case you would like to give it a try.
If you are switching between platforms like Windows, Linux, and Mac - then you'll need the platform-tools appropriate for each platform aka on windows it is adb.exe and on linux it is adb - so get the platform tools for each platform from here and put them all in the same folder
As long as ANDROID_HOME points to the root of the sdk folder, it will work.
I have the same problem, and find that "sudo tns doctor" works fine - even though I installed everything in my non-privileged user's home folder. (SDKs, npm modules, nativescript, etc)
I ran into this problem. I tried following this advice:
eugene@fintechsystems:/$ ls -la $ANDROID_HOME/platform-tools/adb
but I get:
ls: cannot access '~/Android/Sdk/platform-tools/adb': No such file or directory
Then I skip using the environment variable and specify the hard path:
eugene@fintechsystems:/$ ls -la /home/eugene/Android/Sdk/platform-tools/adb
-rwxrwxr-x 1 eugene eugene 2704537 Feb 23 22:37 /home/eugene/Android/Sdk/platform-tools/adb
That works! Really confused so I changed directory using the environment which also works!
eugene@fintechsystems:/$ cd /Android/Sdk/platform-tools/
eugene@fintechsystems:/Android/Sdk/platform-tools$ ls -ls adb
2644 -rwxrwxr-x 1 eugene eugene 2704537 Feb 23 22:37 adb
So to fix the problem instead of using ~/Android/Sdk I've just hard coded /home/eugene/Android/Sdk and now tns doctor works!
Hopefully this will help someone, on my machine all the Android SDKs/ADB were installed in my /Users folder (probably because I already had Android Studio installed).
I fixed it by setting the Android home path to point to the /Users/ sdk by running:
Reacted by Igor Caviroski, tlg-265, Don Milham, Jay Borenstein, Vitaliy Stanyshevskyy, Nicholas Gunner, AnderBalles98, Amol Bodhare, Juan Cruz Mendez, Braydon Harris and 3 more
Hi, i can not find the path where sdk and build tools are installed. I think they were installed on a wrong directory. i get the same problems as above. How can i find where sdk is installed?
I also have a problem with sdk configuration. the adb is installed and configured correctly, and I have added all the needed paths to the $PATH env variable, I have no idea what the problem is
here is the output of $ tns doctor
✔ Getting environment information
There seem to be issues with your configuration.
✔ Getting NativeScript components versions information...
✔ Component nativescript has 6.3.0 version and is up to date.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
✖ WARNING: The Android SDK is not installed or is not configured properly.
You will not be able to run your apps in the native emulator. To be able to run apps
in the native Android emulator, verify that you have installed the latest Android SDK
and its dependencies as described in http://developer.android.com/sdk/index.html#Requirements
You are missing the nativescript-cloud extension and you will not be able to execute cloud builds. Your environment is not configured properly and you will not be able to execute local builds. To continue, choose one of the following options:
Select "Sync to Playground" to enjoy NativeScript without any local setup. All you need is a couple of companion apps installed on your devices.
Select "Configure for Cloud Builds" to install the nativescript-cloud extension and automatically configure your environment for cloud builds.
Select "Configure for Local Builds" to run the setup script and automatically configure your environment for local builds.
Select "Configure for Both Local and Cloud Builds" to automatically configure your environment for both options.
Select "Configure for Both Local and Cloud Builds" to automatically configure your environment for both options.
here are the edits I made to my ~/.bashrc file as well.
I have another nativescript project on same pc and that run without problem, but nativescript-oauth2 github angular example show always "The setup script was not able to configure your environment for local builds"
Update (edit):
I just installed sdk build tools 29.0.3, 28.0.3 and 27.0.3 using sdkmanager and now it works.
Activity
Fatme commentedon May 15, 2018
Hi @pierremacedo,
It seems your
adbis not included in $PATH. {N} CLI tries to execute$ANDROID_HOME\platform-tools\adbto check ifadbis correctly setup. To check it on your side, just executeadbfrom command line.To include it in $PATH you can use
pierreamgabriel commentedon May 15, 2018
@Fatme Thank you but it didn't help and I just found out another problem: NS seems not to recognize the ANDROID_HOME variable set int .bashrc, because as soon as I restart the computer and run tns doctor it tells me the variable isn't set, but it in fact is, since I get this output
bash: /home/pierre/android/sdk/: Is a directorywhen I run $ANDROID_HOMEFatme commentedon May 15, 2018
Hi @pierremacedo,
{N} CLI gets
ANDROID_HOMEfrom process environment. There is no logic to check.bashrcor some other profile files.Can you please confirm that you execute
tns runcommand and$ANDROID_HOMEfrom the same terminal?Fatme commentedon May 15, 2018
Hi @pierremacedo,
Another thing we would like to ask you is to execute the following:
pierreamgabriel commentedon May 15, 2018
@Fatme So now the variable and paths are permanently in environment, so no more warnings saying ANDROID_HOME isn't set.
tns run:
$ANDROID_HOME:
bash: /home/pierre/android/sdk/: Is a directoryecho $ANDROID_HOME && tns doctor:
Fatme commentedon May 16, 2018
Hi @pierremacedo,
I've noticed your $PATH has
/home/pierre/android/sdk/toolsbut it seems you need/home/pierre/android/sdk/tools/bin. Not sure this will resolve your issue but can you please try it:After that can you please execute
Fatme commentedon May 16, 2018
Hi @pierremacedo,
We discussed your problem and actually there are 2 scenarios that might cause this issue.
The first one is in case when android sdk is not fully installed or configured. To verify it, can you please execute
The second one is in case when
adbserver is already running. If this is the case, you need to kill the server. You can use the following:pierreamgabriel commentedon May 17, 2018
@Fatme I think it was probably because I was using Linux 32-bit and google doesn't support this architecture but I didn't know that. But now I'm using a 64-bit Debian and I can't even install the required runtime libraries, so I'm definitely giving up on NS and moving to React Native. Thanks for your help.
rosen-vladimirov commentedon May 17, 2018
Hey @pierremacedo,
My name is Rosen Vladimirov and I'm working on NativeScript since its beginning. I'm sorry to hear you have faced issues with the environment configuration and this led you to the decision to stop using the technology. In fact configuring the environment for both iOS and Android builds is not an easy task and as you have seen, we are still struggling with different issues on this side. However, the technology itself, the NativeScript framework, is really powerful. I'm not sure if you were able to give it a try, so I would like to suggest you to take a look at the following resources, which could give you another way to try NativeScript:
Once again I'm sorry to hear you have faced issues with the configuration. We'll be glad to assist you further in case you would like to give it a try.
IAMtheIAM commentedon Aug 2, 2018
If you are switching between platforms like Windows, Linux, and Mac - then you'll need the
platform-toolsappropriate for each platform aka on windows it isadb.exeand on linux it isadb- so get the platform tools for each platform from here and put them all in the same folderAs long as ANDROID_HOME points to the root of the sdk folder, it will work.
divyachandana commentedon Oct 15, 2018
updating SDK in

AndroidStudio >> Preferenceswould helpWayneDV commentedon Dec 30, 2018
I have the same problem, and find that "sudo tns doctor" works fine - even though I installed everything in my non-privileged user's home folder. (SDKs, npm modules, nativescript, etc)
eugenefvdm commentedon Feb 23, 2019
I ran into this problem. I tried following this advice:
eugene@fintechsystems:/$ ls -la $ANDROID_HOME/platform-tools/adb
but I get:
ls: cannot access '~/Android/Sdk/platform-tools/adb': No such file or directory
Then I skip using the environment variable and specify the hard path:
eugene@fintechsystems:/$ ls -la /home/eugene/Android/Sdk/platform-tools/adb
-rwxrwxr-x 1 eugene eugene 2704537 Feb 23 22:37 /home/eugene/Android/Sdk/platform-tools/adb
That works! Really confused so I changed directory using the environment which also works!
eugene@fintechsystems:/$ cd
/Android/Sdk/platform-tools//Android/Sdk/platform-tools$ ls -ls adbeugene@fintechsystems:
2644 -rwxrwxr-x 1 eugene eugene 2704537 Feb 23 22:37 adb
So to fix the problem instead of using ~/Android/Sdk I've just hard coded /home/eugene/Android/Sdk and now tns doctor works!
Fatme commentedon Feb 23, 2019
What is the output of
echo ~?eugenefvdm commentedon Feb 23, 2019
eugene@fintechsystems:~$
echo ~bash: /home/eugene: Is a directory
zleight1 commentedon Jun 28, 2019
Hopefully this will help someone, on my machine all the Android SDKs/ADB were installed in my /Users folder (probably because I already had Android Studio installed).
I fixed it by setting the Android home path to point to the /Users/ sdk by running:
export ANDROID_HOME=/Users/zleighton/Library/Android/sdkAfter that
tns doctorreported everything OK.Danielhoifodt commentedon Jul 15, 2019
Hi, i can not find the path where sdk and build tools are installed. I think they were installed on a wrong directory. i get the same problems as above. How can i find where sdk is installed?
mahmoudyusof commentedon Jan 2, 2020
I also have a problem with sdk configuration. the adb is installed and configured correctly, and I have added all the needed paths to the $PATH env variable, I have no idea what the problem is
here is the output of
$ tns doctorhere are the edits I made to my ~/.bashrc file as well.
gabrielg-dev commentedon Feb 10, 2020
I have another nativescript project on same pc and that run without problem, but nativescript-oauth2 github angular example show always "The setup script was not able to configure your environment for local builds"
Update (edit):
I just installed sdk build tools 29.0.3, 28.0.3 and 27.0.3 using sdkmanager and now it works.
gajanannaik commentedon Jun 30, 2020
When i tried to run tns doctor i got this error help me please!