- Open Android Studio
- File -> Settings... -> Appearance & Behavior -> System Settings -> Android SDK
- You should be able to see a field "Android SDK Location"
set ANDROID_HOME= {location taken from top Android SDK path}
set PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_66
Sometimes, even though set everything correctly, we need to make sure following things:
- Computer name should not have space in between
Also, you might not face issues only when run the CLI as administrator.