Im trying to set cordova on my laptop using windows 7 and I still get that message
you have to Install Android SDK Packages first, Follow steps in this URL
https://cordova.apache.org/docs/en/latest/guide/platforms/android/
then you have to set Environment Variables:
Set the JAVA_HOME environment variable to the location of your JDK
installation.
Set the ANDROID_HOME environment variable to the
location of your Android SDK installation It is also recommended
that you add the Android SDK's tools, tools/bin, and platform-tools
directories to your PATH
Related
I'm having below error while passing the command cordova requirements.
I have installed cordova (-g) globally ,installed apache ant , android sdk and set the %ANDROID_HOME% root path have installed node still unable to emulate android
$ cordova requirements
Requirements check results for android:
Java JDK: installed 14.0.2
Android SDK: not installed
Failed to find 'ANDROID_SDK_ROOT' environment variable. Try setting it manually.
Detected 'adb' command at C:\adb but no 'platform-tools' directory found near.
Try reinstall Android SDK or update your PATH to include valid path to SDK\platform-tools directory.
Android target: installed Google Inc.:Google APIs:24,Google Inc.:Google APIs:23,Google Inc.:Google
First of all look at your error shown:
Requirements check results for android: Java JDK: installed 14.0.2 Android SDK: not installed Failed to find 'ANDROID_SDK_ROOT' environment variable.
Cordova is still supporting Java JDK 8. So you have to uninstall other Java versions and install Java JDK 8 from here[ either Oracle Java or Open JDK]:
Oracle Java - https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
Open JDK 8 - https://developers.redhat.com/products/openjdk/download
After installation, set variable path like, JAVA_HOME & javac
For steps see here: https://androidabcd.info/how-to-set-java_home-in-windows-10/
You can check the java version and the javac version:
java -version
javac -version
Now you need to install Android studio to get the Android SDK. Once you get the android-sdk path, then you can set it in a variable path.
For Windows:
set ANDROID_SDK_ROOT=C:\installation location\android-sdk
set PATH=%PATH%; %ANDROID_SDK_ROOT%\tools; %ANDROID_SDK_ROOT%\platform-tools;
You can check the installation location of the sdk by opening Android Studio, on top right corner option select "SDK Manager". Then copy the sdk location.
Also, you need Gradle, and that you download Gradle binary from here and extract it in the C folder.
Set Gradle Path:
set PATH=%PATH%;C:\Gradle\gradle-7.1.1\bin;
Assuming you're using Windows 10. In the Windows Search menu, search for "Edit the system environment variables"
This will open up a "System Properties" dialog. Click on "Environment Variables..." button. This will open a "Environment Variables" dialog.
You can create new variables here, it can be either User or System. Click "New"
Enter ANDROID_SDK_ROOT for the name. The value should be the full absolute path of your JDK.
BTW, Android sdk expects java 8, and you have java 14 installed. Some android tooling won't work with anything higher than JDK 8. - Modern Android SDK supports up to JDK 11 now, potentially higher.
OS : Windows 7
I am getting "Android SDK not found" error in cordova,
I have added environment variable "ANDROID_HOME" in user variable section
C:\Users\KDN\AppData\Local\Android\sdk
and also added "tools" and "platform-tools" in PATH in System variable section
C:\Users\KDN\AppData\Local\Android\sdk\tools
C:\Users\KDN\AppData\Local\Android\sdk\platform-tools
after setting this variables, when I type android in command prompt
C:\Users\KDN>android
I get following result
**************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools\bin\sdkmanager.bat
and tools\bin\avdmanager.bat
**************************************************************************
Invalid or unsupported command ""
Supported commands are:
android list target
android list avd
android list device
android create avd
android move avd
android delete avd
android list sdk
android update sdk
but still when I try to execute
cordova build android
I get 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.
I am using android version 5.1.1 in cordova and same is installed in SDK too.
check this link Cordova: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable
If not working try to reinstall again.. sometime it doesn't take the values
Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.
This is the problem
Cordova cant acces to the SDK even it is installed , i dont know how to change the default location but i have tried to create the android_home variable but it didnt work .
This problem is connected with actualization of Android. Android depreciated his tool: android, you can check it typing android in command line. You should see:
*************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
*************************************************************************
Invalid or unsupported command ""
Supported commands are:
android list target
android list avd
android list device
android create avd
android move avd
android delete avd
android list sdk
android update sdk
You can solve it updating cordova
npm install -g cordova
and android platform in cordova
cordova platform rm android; cordova platform add android#6.2.3
Source
Cordova: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable
Hi Guys I have been having trouble on setting up my android sdk on my Fedora23 OS this is for a Cordova development. I have checked my Environment Variables on my terminal using echo $ANDROID_HOME and verifying whats installed correctly using cordova requirements command and this is the result it gave me
Requirements check results for android:
Java JDK: installed .
Android SDK: installed
Android target: not installed
Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.
Gradle: installed
Requirements check results for ios:
Apple OS X: not installed
Cordova tooling for iOS requires Apple OS X
Error: Some of requirements check failed
How come that the Android Target was not installed while Gradle was installed?
and also how come whenever I tried to use android commands its not working
have I did something incorrect? this is how I setup my android sdk
I downloaded the android-sdk from Android Studio's site
I extracted it using tar command
Moved it to /opt/
Added the android sdk home to my environment at /etc/bashrc
its been two days now and I still dont have it running someone help please
UPDATE
inside my bashrc are the ff:
ANDROID_HOME=/opt/android-sdk-linux/
export PATH="$HOME/opt/android-sdk-linux/android-sdk/tools:$PATH"
export PATH="$HOME/opt/android-sdk-linux/platform-tools:$PATH"
export ANDROID_HOME
I think your bashrc should be
ANDROID_HOME=/opt/android-sdk-linux/
export PATH="/opt/android-sdk-linux/android-sdk/tools:$PATH"
export PATH="/opt/android-sdk-linux/platform-tools:$PATH"
export ANDROID_HOME
Error Message
Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.
I checked environment variables, it does have ANDROID_HOME and the same has been mentioned in Path variable value.
I am not sure why still I am getting this error. Any help?
Thank you.
I was able to fix this by updating Android SDK (It was install and working, but I guess, Visual Studio needs few more updates).
After updating, please check followings in Tools ---> Options:
1. Android SDK path is correct in Xamarin tools.
2. Cross platforms
3. Cordova tools, environment variable section.
PS: I don't understand why Visual Studio is using these three separate options, and complexly ignores the Environment variable set at system level.