Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable

"Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable."

Facing this issue while building the Cordova Project through Terminal, if I run through Android Studio I am not getting the issue what will be the root cause for this issue.

like image 532
Mahalakshmi Saravanan Avatar asked Mar 22 '17 11:03

Mahalakshmi Saravanan


2 Answers

This is just a workaround while cordova is being updated:

  1. Remove directory /Android/sdk/tools
  2. download https://dl.google.com/android/repository/tools_r25.2.3-linux.zip
  3. Unzip
  4. Place new folder in /Android/sdk/tools
like image 170
Diego Mello Avatar answered Oct 20 '22 04:10

Diego Mello


If nothing was worked, try

cordova platform remove android

and

cordova platform add android

in your Cordova project

edit

Solution 2

Remove cordova

npm uninstall cordova -g

Add cordova

npm install -g cordova

Remove Android platform from project

cordova platform remove android

Add Android platform again

cordova platform add android
like image 39
Bahu Avatar answered Oct 20 '22 05:10

Bahu