-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: cordova run --emulator not working with Android SDK Command-line Tool 11.0 #1346
Comments
Next major for API 34 support will bump the JDK requirement to 17. Despite the docs stating it requires JDK 11, JDK 17 should work on cordova-android@12. So you should be able to set Alternatively downgrading command line tools package to version It's good to know that the command line tools actually has a dependency on the java runtime, so this definitely should be reflected in the docs, rather than suggesting to install the latest version. |
Thank you for your reply. The problem was solved by using JDK17 you suggested. I agree with improbe the document by writing about JDK version or command-line tools version to prevent new entrants from stumbling if it is premise that command-line tools uses the same JDK version to cordova uses. Thank you anyway. |
cordova run --emulator
not working with Android SDK Command-line Tool 11.0
I moved this to the docs repo. I think we should just document using a specific version of command line tools instead of latest. |
Downgrading command line tools package from Here is my
Also deleted my As @breautek stated, if we could update Installing SDK Command-line Tools (latest) Huge thanks! |
Bug Report
Problem
cordova run --emulator
command fails and the emulator don't be launched.What is expected to happen?
The emulator starts and launch the sample application.
What does actually happen?
The application was built successfully but the emulator don't be launched.
Below is the log the command outputted.
Information
The error message says that the command
avdmanager list avd
cannot execute because Java version is too old.avdmanager
command is part of Command-line tools and actually it doesn't work with Java11 which specified by Cordova.Reading emulator.js, it indeed calls
avdmanager
command.According to the document, using Environment Variable
CORDOCA_JAVA_HOME
, we can use multiple Java versions differently for Cordova and other programs.I thought that I can solve this problem by setting
CORDOCA_JAVA_HOME
as JDK11 andJAVA_HOME
as JDK21 because Command-line tools is not part of Cordova and it should be execute with the Java specified withJAVA_HOME
, but it didn't work.Reading java.js, if the environment variable
CORDOVA_JAVA_HOME
is specified, it setJAVA_HOME
asCORDOVA_JAVA_HOME
's value and the original value ofJAVA_HOME
is discarded.That may be why
avdmanager
is executed with old java version.Command or Code
Environment, Platform, Device
Windows10 (Japanese language)
Powershell 5.1.19041.3693
Environment Variables
Version information
Checklist
The text was updated successfully, but these errors were encountered: