0
votes

=)

"tns doctor", "tns run" or "tns run android" tells me it has issues with

"WARNING: adb from the Android SDK is not installed or is not configured properly.", "WARNING: adb from the Android SDK is not installed or is not configured properly.", "Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 28 or later.", "You need to have the Android SDK Build-tools installed on your system. You can install any version in the following range: '>=23 <=28'."

Here is my configuration :

Windows 10 - Pro 64-Bit, 
System Environment Variables: 
Variable: "ANDROID_HOME" --> Value: "C:\Android\android-sdk"
Variable: "Path" --> Values "C:\Android\android-sdk\tools; C:\Android\android-sdk\platform-tools; C:\Android\android-sdk\tools\bin; C:\adbDevices\adb-tools;"

At my very first try to install nativescript Android Studio was already installed, so i deinstalled Android Studio and let it install via choco.

I followed exactly the instructions of https://docs.nativescript.org/start/ns-setup-win. If I start via CMD "tns run" or "tns doctor" I get the errors mentioned above.

Everything else like java-jdk or chocolatey and so on is installed and set in the environment variables... enter image description hereenter image description here

Any help is appreciated... Of course I searched for these warning/errors in the internet but all related posts are from 2017 and they do not provide a solution.

1
Ok, so what is your version of NativeScript CLI, i.e. the output of tns --version. Also what is the output of echo %ANDROID_HOME% correct ? - Vladimirov
* CLI: Version 5.2, echo %ANDROID_HOME% ---> C:\adbDevices\adb-tools - Hugo
Ok, so it seems the ANDROID_HOME in your terminal is not correct for some reason - it points to C:\adbDevices\adb-tools instead of C:\Android\android-sdk. Can you open Window's UI for editing environment variables and check for duplicate ANDROID_HOME entries in your user's and system's environment variables? - Vladimirov
Indeed it has in my users environment variables ANDROID_HOME is "C:\adbDevices\adb-tools", and my system environment variables ANDROID_HOME is "C:\Android\android-sdk", so should I change both to "C:\Android\android-sdk" ? - Hugo
You can just remove your user's one, there's no need to have it set two times. And yes, it should point to C:\Android\android-sdk - Vladimirov

1 Answers

0
votes

Ok thank you very much @Vladimirov the issue was my User Enviornment Variable had the path to the adb instead of the path to the sdk... So I changed my User Environment Variable like my System Environment Variable to the path to my SDK and it is working fine now. :))))))

<3 Thank you very much Vladimirov!