Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova - Android SDK not found

I saw a lot of thread in here related to this, but any of them helped me.

With Cordova 6.5.0 installed and Android Studio also installed with Android 6.0 (API 23) and Android 4.4 (API 19), I'm trying to run:

cordova requirements

I got the following error:

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

Ok. I set up the ANDROID_HOME and the PATH:

export ANDROID_HOME=/Users/USER/Library/Android/sdk
export PATH=${PATH}:/Users/USER/Library/Android/sdk/platform-tools:/Users/italoborges/Library/Android/sdk/tools

I also changed inside platforms/project.properties the line:

target=android-23

And inside platforms/android/AndroidManifest.xml the line:

<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="23" />

And inside platforms/android/CordovaLib/AndroidManifest.xml the same line above.

Right now I'm stuck because I have tried all the possibilities that I found.

Thanks.

like image 862
Italo Borges Avatar asked Mar 15 '17 14:03

Italo Borges


People also ask

Does Cordova support Android 12?

We have integrated the Android 12 SplashScreen API including the compatibility library into the core of the Cordova-Android platform to provide support for Android API 22+.

What is Cordova-Android version?

If you are using any version below cordova-android 10.0. 0, install the Java Development Kit (JDK) 8. The JAVA_HOME environment variable must be set according to your JDK installation path when installing on a Windows environment.


1 Answers

I solved this problem updating cordova:

cordova platform rm android
cordova platform add android@latest

and then:

cordova run android
like image 140
Jonathan Nolasco Barrientos Avatar answered Oct 20 '22 00:10

Jonathan Nolasco Barrientos