Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NativeScript Installation Issues

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

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

When I run the below command in Command Prompt (with administrative 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 issue. But when I try to verify the installation through command, "tns doctor" I returns below warnings:

 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 please guide?

I am using Windows 10, and have Visual Studio 2015 (update 3) and Visual Studio Code installed on my machine.

like image 469
Naveed Ahmed Avatar asked Oct 25 '16 21:10

Naveed Ahmed


People also ask

What is the latest version of NativeScript?

NativeScript 8.2 brings some new features, broad memory optimizations throughout core and runtimes, some bug fixes, as well as support for the latest iOS (Xcode 13.3/iOS 15.4 release) and Android tooling (Android API 32 as well as gradle 7).

Is NativeScript fast?

NativeScript apps are usually slower because the framework employs a single-threaded approach to access native device APIs.

Does NativeScript work on Web?

You can write applications for the web using Vue. js. Thanks to NativeScript-Vue, you can also write mobile applications. A code-sharing project is one where you keep the code for the web and mobile apps in one place.


1 Answers

The command line of installing Android also didn't work for me and gave me the same errors as you. I figured out this by downloading and installing Android Studio. After your installation, you should be able to find the location of the android sdk, which is /Users/myMacUserName/Library/Android/sdk in my situation. And you could select all the needed things through SDK Manager. In the terminal, you then do 'export ANDROID_HOME=/Users/myMacUserName/Library/Android/sdk' instead of the command from NativeScript installtion instruction 'export ANDROID_HOME=/usr/local/opt/android-sdk'. After all these, you should be okay with the Android SDK errors.

like image 196
Becky Wu Avatar answered Oct 13 '22 02:10

Becky Wu