breautek commented on issue #1554:
URL: 
https://github.com/apache/cordova-android/issues/1554#issuecomment-1415954309

   First some background knowledge:
   
   cordova-android 10 if you were following the documentation, uses the legacy 
Android SDK parts which expects Java 8, but *is* compatible with Java 11, if 
your environment is configured to use the modern SDK tooling (e.g. using 
`cmdline-tools` instead of `tools/` found in the platform package).
   
   cordova-android@11 to support API 31 and later requires the use of current 
Android SDK tooling which expects Java 11.
   
   cordova-android@9 and earlier used to check and enforce that you're running 
Java 8. That check was removed in version 10, so your SO link is in referencing 
to a vesion older than 10, and is out of date now.
   
   Note that the `cordova` version doesn't necessarily match with the platform 
(cordova-android) version.
   Use `cordova platform ls` to list platform versions.
   
   > but im not quite sure if 8 comes before 1.8 
   
   1.8 is Java 8. Java historically used 1.0, 1.1, 1.2, .. so on. They switched 
to a simple number at version 5, so it was Java 5, instead of Java 1.5. 
However, some people continued to reference the versions using the old name 
scheme.
   
   > im getting this error that chat gpt seems to think is associated with 
either android version 61 or jdk-17.0.2
   
   "file major version 61" indicates you're using Java 17.x, which isn't a 
recommended version.
   
   > that said, I am 75% sure its not a java issue, but a gradle issue due to 
the error message i am getting.
   
   The error does indicate a java issue. Gradle is essentially saying it isn't 
compatible with file major version 61, or JDK 17.
   
   My recommendation:
   
   Keep up with versions. cordova 11 installs cordova-android 10 by default, 
but there is a newer version available, so if possible upgrade to 
cordova-android@11. This can be done by doing:
   
   ```
   cordova platform remove android
   cordova platform add android@11
   ```
   
   If you plan on deploying to google play, cordova-android@11 is required.
   
   For cordova projects, use Java/JDK 11. This is what Android Studio uses and 
using newer JDK versions may not work. Android Studio does ship JDK with 
itself, so you can point it to that installation (should be inside 
`<android-studio-root>/jre`, or you can install JDK 11 from your favourite 
vendor.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to