Reputation: 490
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?
Upvotes: 1
Views: 108
Reputation: 11213
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.
Upvotes: 1