Problems installing NativeScript

I was just trying to install NavtiveScript, for this I followed the official installation guide available in

http://docs.nativescript.org/angular/start/quick-setup but I am stuck at "Step 3: Install iOS and Android requirements"

When I run the command below on the command line (with administrator privileges)

 @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))" 

Everything seems to be installed without any problems. But when I try to check the installation using the "tns doctor" command, I return the warnings below:

  D:\>tns doctor 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 TIP: To avoid setting up the necessary environment variables, you can use the chocolatey package manager to install the Android SDK and its dependencies. WARNING: The Android SDK is not installed or is not configured properly. You will not be able to build your projects for Android and run them in the native emulator. To be able to build for Android and run apps in the native emulator, verify that you have installed the latest Android SDK and its dependencies as described in http://developer.android.com/sdk/index.html#Requirements TIP: To avoid setting up the necessary environment variables, you can use the chocolatey package manager to install the Android SDK and its dependencies. NOTE: You can develop for iOS only on Mac OS X systems. To be able to work with iOS devices and projects, you need Mac OS X Mavericks or later. Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 22 or later. Run $ android to manage your Android SDK versions. You need to have the Android SDK Build-tools installed on your system. You can install any version in the following range: '>=23 <=24'. Run android from your command-line to install required Android Build Tools. You need to have Android SDK 22 or later and the latest Android Support Repository installed on your system. Run $ android to manage the Android Support Repository. 

Can anyone advise?

I am using Windows 10 and have Visual Studio 2015 (Update 3) and Visual Studio code installed on my machine.

+5
source share
2 answers

The Android installation command line also did not work for me and gave me the same errors as you. I figured this out by downloading and installing Android Studio. After installation, you can find the location of Android-sdk, which in my situation is / Users / myMacUserName / Library / Android / sdk. And you can select all the necessary things through the SDK Manager. In the terminal, you then "export ANDROID_HOME = / Users / myMacUserName / Library / Android / sdk" instead of the command from the NativeScript installation instructions, "export ANDROID_HOME = / usr / local / opt / android-sdk". After all this, you should be fine with the Android SDK errors.

+2
source

https://developer.android.com/studio/index.html

Install Android studio from the above link, and then after that start the studio and install the necessary sdk packages for Android from the studio.

0
source

Source: https://habr.com/ru/post/1258776/


All Articles