hidar
hidar

Reputation: 5939

Nativescript install on windows doesn't work.

I installed nativescript from https://docs.nativescript.org/start/quick-setup page, and when I checked tns doctor I get this error:

enter image description here

I could search for the errors and probably learn a thing or two about the errors, but what I don't understand is why the installer itself didn't install Android SDK 22, or the other issues. I gave it full permission and it installed the sdk and other everything.

Upvotes: 1

Views: 738

Answers (3)

mast3rd3mon
mast3rd3mon

Reputation: 8825

You need to android sdk 23 AND the sdk of your choice (ie 25). I would recommend using the installer instead of the cmd install line as it is a lot easier to use, which can be found here. If you use the installer, it installs the versions you need and changes the environment variables for you as well as the other parts it needs.

EDIT

Another thing to mention is that even though the installer changes the paths for you and installs the sdks, you still need to make your own emulator image. It's not hard to setup but unfortunately the nativescript installer doesnt do that for you

Upvotes: 1

Hantsy
Hantsy

Reputation: 9261

According to the result of tns doctor, you have to install Android SDK.

  1. You can simply install Andriod Studio. Start up Android studio, and use the built-in SDK manager to install required SDK, choose the correct version(>=23 <= 26) which was indicated in the result of tns doctor.

  2. Alternatively, you can install Android SDK standalone, download it from Android developer site and extract files in your system, then follow the instruction of tns doctor, go to Android SDK folder, and find sdkmanager, and start up it to install required SDK with correct version.

  3. Set ANDROID_HOME environment variable, the location points to the Android SDK folder, eg. E:\Users\hantsy\AppData\Local\Android\Sdk

  4. Finally, try to run tns doctor again to check if all conditions are satisfied.

You can run the packaged Android app in one of the following:

  1. Android SDK built-in simulator
  2. A real Android mobile device
  3. Genymotion Android simulator, more productive than SDK built-in one

Upvotes: 0

Shiva Prasad
Shiva Prasad

Reputation: 438

First up, install Android Studio https://developer.android.com/studio

Install android API level 25 (Nougat), from the SDK Manager.

Also, setup a virtual device, if you want to run apps on emulator.

That should setup all necessary environment variables for building Android apps with nativescript.

Upvotes: 0

Related Questions