You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2022/06/03 21:22:15 UTC

[GitHub] [cordova-android] rene-dohan opened a new issue, #1440: Unsupported class file major version 61

rene-dohan opened a new issue, #1440:
URL: https://github.com/apache/cordova-android/issues/1440

   # Bug Report
   
   ## Problem:
   
   ```
   brew instal cordova
   cordova create 
   cordova platform add android
   cordova run android
   ```
   
   ### What is expected to happen?
   Should work
   
   ### What does actually happen?
   On JDK18 or 17 I get something like `Unsupported class file major version 61`
   On JDK16 I get :
   ```
   Execution failed for task ':app:processDebugMainManifest'.
   > Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @754bd4c
   ```
   
   ### Environment, Platform, Device
   CPU Apple M1 ARM, flawless android development with current toolchain.
   


-- 
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: issues-unsubscribe@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek commented on issue #1440: Unsupported class file major version 61

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1440:
URL: https://github.com/apache/cordova-android/issues/1440#issuecomment-1146673892

   You can try asking on SO, or you can also try asking on our [Slack](https://join.slack.com/t/cordova/shared_invite/zt-z70vy6tx-7VNulesO0Qz0Od9QV4tc1Q) community. I'm pretty sure some community members do have an M1 mac....
   
   I missed that original detail, I have never tried doing this on M1 macs yet. Don't have access to one either unfortunately. Perhaps there is an incompatibility with M1 macs, and if there is a workaround, then we can document that in a new issue so that we can track it and hopefully find a solution.


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek commented on issue #1440: Unsupported class file major version 61

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1440:
URL: https://github.com/apache/cordova-android/issues/1440#issuecomment-1146388230

   Gradle & Android SDK does not support Java 18, therefore Cordova doesn't support Java 18.
   
   Gradle itself claims support for up to Java 17, but Android SDK doesn't define what JDKs it supports. Instead they do recommend using the Java JDK that is shipped with Android Studio, which currently is a Java 11 implementation. As such, Cordova is only tested with Java 11. (Current release is actually tested against Java 8)
   
   The error seems to indicate some kind of incompatibility with the Java SDK, so therefore I'd recommend try using Java 11. An implementation should be shipped with your Android Studio's installtion inside `<android studio path>/jre` which you can set your `PATH` and `JAVA_HOME` environment variables accordingly.
   
   Closing this issue as won't fix due to the reasons mentioned above. Should you encounter issues while using a JDK 11 implementation, please open a new issue with the details documented and we can proceed from there.


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek closed issue #1440: Unsupported class file major version 61

Posted by GitBox <gi...@apache.org>.
breautek closed issue #1440: Unsupported class file major version 61 
URL: https://github.com/apache/cordova-android/issues/1440


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek commented on issue #1440: Unsupported class file major version 61

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1440:
URL: https://github.com/apache/cordova-android/issues/1440#issuecomment-1146485440

   That error looks consistent with using the legacy android tools with a java version > 8
   
   Android SDK has two versions of tooling, one available at `$ANDROID_SDK_ROOT/tools/bin`, which are legacy tools and will not work with Java 11, only java 8.
   
   They have a newer package which can be installed via the SDK manager called `cmdline-tools`. Personally I'm using version 6 successfully, but I think any version of it works. Ensure that `$ANDROID_SDK_ROOT/cmdline-tools/<version>/bin/` is in your path.
   
   https://cordova.apache.org/docs/en/11.x/guide/platforms/android/index.html#setting-environment-variables contains some other potentially required environment variables or paths.


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] rene-dohan commented on issue #1440: Unsupported class file major version 61

Posted by GitBox <gi...@apache.org>.
rene-dohan commented on issue #1440:
URL: https://github.com/apache/cordova-android/issues/1440#issuecomment-1146460343

   I used Android Studio JDK and it failed here and build was successful but it failed immediately after here: 
   
   Command failed with exit code 1: apkanalyzer manifest target-sdk /Users/renetik/Desktop/test_cordova/app2/platforms/android/app/build/outputs/apk/debug/app-debug.apk
   Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
   	at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
   	at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
   	at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
   	at com.android.tools.apk.analyzer.ApkAnalyzerCli.getAaptInvokerFromSdk(ApkAnalyzerCli.java:277)
   	at com.android.tools.apk.analyzer.ApkAnalyzerCli.main(ApkAnalyzerCli.java:129)
   Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
   	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
   	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
   	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
   	... 5 more
   
   Should I create other issue ?


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] rene-dohan commented on issue #1440: Unsupported class file major version 61

Posted by GitBox <gi...@apache.org>.
rene-dohan commented on issue #1440:
URL: https://github.com/apache/cordova-android/issues/1440#issuecomment-1146669443

   It looks like I am geeting closer and closer :) 
   
   Now it seems to not find the android emulator it say:
   Could not launch '/Users/renetik/Library/Android/sdk/tools/../emulator/qemu/darwin-x86_64/qemu-system-aarch64': No such file or directory
   
   But my emulator path is $ANDROID_SDK_ROOT/emulator/qemu/darwin-aarch64/ I am on M1 so obviously I have no x86_64 emulator can this be misconfigured somewhere ? 
   
   iOS emulator launched fine thou.. I can create another issue or ask on stackowerflow if you believe it will help others too I dont see anyone asking this.


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org