question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android SDK is not installed or is not configured properly, environment looks ok.

See original GitHub issue

First of all, I am very new to Nativescript. I am in the process of trying to set it up on windows 10. I have all the tools installed as far as I can tell and have made sure my android environment is setup. When I type android at the cli I get the sdk manager and have them installed (sdk build tools etc).

Java is at version 1.7.0_55 on my box and that seems fine. What is not fine is that Nativescript insists my ANDROID_HOME is not set or is invalid.

I have run a doctor script which I include (attached) log.txt

I looked at the first error which was adb help and I ran that command directly from the same shell I got the following output from adb.exe

adbout.txt

The reason I am filing this issue is because I receive an errror when trying to add a platform using

tns platform add android

When I issue this command I get the following message:

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.

This appears not to be the case. And so I am filing an issue as I cannot add the android platform to my app.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:30 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
bboydflocommented, Sep 22, 2017

I have the same problem, on mac 😦

5reactions
ssimpocommented, Feb 2, 2018

Not sure if this helps anyone but I had the same issue on Linux (Ubuntu) after issuing:

sudo npm install nativescript -g --unsafe-perm

However, in the end I realised it was my environment variables not being carried forward to sudo. Once, I added:

Defaults env_keep += "ANDROID_HOME JAVA_HOME"

to the bottom of /etc/sudoers it worked perfectly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nativescript "WARNING: The Android SDK is not installed or is ...
Make sure your Android SDK is installed and pointed at inside $ANDROID_HOME and $ANDROID_SDK_ROOT according to the actual installation SDK ...
Read more >
The Android SDK isn't installed or it's not configured properly
Your environment is not configured properly and you will not be able to execute local builds. To continue, choose one of the following...
Read more >
Fix "Unable to locate adb within SDK" in Android Studio
Firstly check if the adb is present in the SDK folder. For this, open C:\Users\Username\AppData\Local\Android\Sdk\platform-tools and check if ...
Read more >
Setting Up Android SDK and NDK for Unreal
1. Installing Android Studio · Navigate to the Android Studio Archive in your web browser. · Run the Android Studio installer. · In...
Read more >
Known issues with Android Studio and Android Gradle Plugin
To fix this issue, upgrade your Android 11 emulator to version 9 or higher by navigating to Tools > SDK Manager. In the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found