1

I am very new to nativescript and just starting up a new project using nativescript. I am trying to run nativescript starter template using tns run android and its showing error saying The ANDROID_HOME environment variable is not set or it points to a non-existent directory. You will not be able to perform any build-related operations for Android.

Can someone help me in fixing in this issue please?

3
  • Can you provide more info about your operating system? Also, did you managed to successfully complete the installation steps as described here: docs.nativescript.org/start/quick-setup? Commented Apr 25, 2017 at 14:32
  • @anthares I completed the setup without any errors. I am using Windows 8. Commented Apr 25, 2017 at 14:34
  • were you using the manual setup instructions or the Windows installer? Commented Apr 26, 2017 at 11:45

1 Answer 1

1

For some reason the ANDROID_HOME environment variable on your machine is not created successfully. You can try to set it up manually, using the following PowerShell command:

[Environment]::SetEnvironmentVariable("ANDROID_HOME", "<Path to Android SDK>", "Machine")

You will need restart your console in order this to take effect. By the way, if you run tns doctor, it should tell you if there is a problem with your local setup.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.