WARNING: The Android SDK is not installed or is not configured properly

240 Views Asked by At

Problem

Under Windows Subsystem Linux (WSL) running tns doctor or any other tns command results with:

WARNING: The Android SDK is not installed or is not configured properly.
1

There are 1 best solutions below

0
On

Solution

  1. Go to android-sdk on your system.
  2. Rename emulator/emulator.exe to emulator.
  3. Download platform-tools for linux (exact same version as for windows) and merge windows platform-tools with linux platform-tools.
  4. Make sure you use proper version of java for NativeScript.
  5. Make sure you properly set environmental variables in .bashrc under WSL (in my case):
export ANDROID_HOME='/mnt/d/Android/sdk'
export JAVA_HOME='/usr/lib/jvm/java-8-openjdk-amd64'
export PATH=$PATH:$ANDROID_HOME/platform-tools