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.
Related
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
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
I try to programing in visual studio for android.
I install SDK , JDK ,Xamarin .Now I want set path of jdk to the visual studio but vs get message that :
Cannot find Java Development Kit files in specified path:
C:\Program Files\Java\jre1.6.0_07\bin
I set this path for Path and Home_java variable on the Enviroment Variable in SystemAdvanceSetting.
I use where javac in cmd but it can not find java path.
How to fix this?
Xamarin 4.1.2.18 and earlier doesn't currently support a 64-bit JDK. You should install a 32-bit version of JDK 1.7u79, which Xamarin will be able to detect. You can see which JDK Xamarin is using by clicking the Visual Studio menu Tools > Xamarin. You will see the listed JDK and Android SDK directories.
Xamarin.Android 4.1.2.18 and earlier also requires that a 32-bit Java JDK 7 (1.7) be
installed. Later versions of the JDK can also be installed alongside
JDK 7, if required by your machine.
You can use a 64-bit JDK 8 installation with the newer Xamarin 4.2 and later.
Your JDK path must point to C:\Program Files\Java\jre1.6.0_07, not to the bin directory.
Update your JAVA_HOME environment variable and try again.
After updating to SDK Tools 23 (or newer), whenever I try to build an SD application targeting Android with GeneXus, I get the following message after compilation:
error: Could not find: <sdk>\platform-tools\zipalign.exe
Command: zipalign 4 "<path_to_apk-release-unsigned.apk>" "<path_to_apk>"
error: The system cannot find the file specified
Android Compilation Failed
Why is this?
Starting with SDK Tools 23, zipalign.exe was moved again. It is no longer in its previous location (under <sdk>\tools), but only in the subdirectories of <sdk>\build-tools.
This issue is fixed in GeneXus X Evolution 3 Upgrade 1 (as well as Evolution 2 Upgrade 7). For now, you can avoid this problem by following these steps:
Make sure that at least one version of the SDK Build-tools is installed (this is necessary for building anyway).
Copy the zipalign.exe file from <sdk>\build-tools\<version> to <sdk>\tools or <sdk>\platform-tools.
Run the SDK Manager and upgrade the Android SDK Tools and Platform Tools. Check Android Build-Tools. Select and Install the package. It is the new package location for zipalign.
Update the IDE to point to the new location for zipalign. Start from the main menu in the IDE,
select Tools >> Options >> Environment Options >> SDK Manager.
Update the ZipAlign location to point to the new Build-Tools directory:
C:\Users\Public\Documents\Embarcadero\Studio\15.0\PlatformSDKs\adt-bundle-windows-x86-20131030\sdk\build-tools\23.0.1\zipalign.exe.
I have installed SDK and eclipse, but SDK manager and avd manager doesn't open, a black screen flashes for a Milli seconds and closes. Here is what I have tried :-
( NB - I am using a 32-bit Windows 8 that runs on x86 processor )
Tried to define environment variables to a path -
JAVA_HOME C:\Program Files\Java\jdk1.7.0_21\bin
JAVA_JRE C:\Program Files\Java\jre7\bin
But still, it doesn't work.
On trying to run android.bat, I get a window that says..
ERROR: No suitable Java found. In order to properly use the Android Developer
Tools, you need a suitable version of Java installed on your system. We
recommend that you install the JDK version of JavaSE, available here:
http://java.sun.com/javase/downloads/
You can find the complete Android SDK requirements here:
http://developer.android.com/sdk/requirements.html
Replaced JRE 1.7 with JRE 1.6. It also didn't help
If you already have installed JRE/JDK, then add JRE/JDK to Environment variables > PATH:
C:\Program Files\Java\jre7\bin
Or
C:\Program Files\Java\jdk1.7.0_15\bin
Please note that the actual JDK version installed on your machine may differ.
Check your PATH system, and check if you have a java.exe file in C:\Windows\system32; remove it (make a backup) and try to reinstall your android sdk. I think you have another virtual java machine running in your pc.
For check your current java machine: open a console and type "java -version"
If you would like to try the new Android Studio (released under the 2013 Google I/O) it's most suitable that start from scratch about configuring environment.
https://developer.android.com/sdk/installing/studio.html