GitHub user breautek added a comment to the discussion: Android build failing 
before launch

> * What went wrong:
BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' 
Unsupported class file major version 67
> Unsupported class file major version 67

This indicates that you're running [JDK 
23](https://javaalmanac.io/bytecode/versions/). Android SDK requires JDK 17 as 
I mentioned in an earlier post. Android SDK tends to lag behind quite 
significantly over the newer bleeding edge java.

> so you should double check that you have the latest patch of JDK 17 installed

To be more clear, I meant to ensure you're using the latest patch/minor release 
of JDK 17. e.g. if you were had JDK 17.0.**0**, when JDK 17.0.**14** is 
available, that could resolve issues. I did not mean to upgrade to a newer JDK 
major release if you were already using JDK 17.

To resolve this issue, you'll need to downgrade to JDK 17. If you need JDK 23 
for something else on your workstation, you can have both installed 
simultaneously and use `CORDOVA_JAVA_HOME` environment variable to make cordova 
use JDK 17. `CORDOVA_JAVA_HOME` if set will take priority over `JAVA_HOME` 
**when using the Cordova command line tool**.

GitHub link: 
https://github.com/apache/cordova/discussions/527#discussioncomment-12366767

----
This is an automatically sent email for issues@cordova.apache.org.
To unsubscribe, please send an email to: issues-unsubscr...@cordova.apache.org


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

Reply via email to