shreyashsaitwal / rush-cli

:zap: A new and improved way of building MIT AI2 extensions.
GNU General Public License v3.0
46 stars 24 forks source link

Can't process class [com/sgview/nfccheck/Nfccheck.class] (Unsupported version number [65.0] (maximum 58.0, Java 14))) #61

Open doxuanhop opened 1 week ago

doxuanhop commented 1 week ago

Bug Report

Describe the bug When trying to build an extension using rush CLI, the build process fails with the following error message:

Can't process class [com/sgview/nfccheck/Nfccheck.class] (Unsupported version number [65.0] (maximum 58.0, Java 14))

This indicates that the class file was compiled with Java 21 (version 65.0), which is not supported by the build tools that only support up to Java 14 (version 58.0).

To Reproduce Steps to reproduce the behavior:

  1. Set up the project with rush CLI.
  2. Attempt to build the project by running rush build.
  3. Observe the error message during the build process.

Expected behavior The project should compile successfully without any version compatibility errors, producing the expected extension files.

Screenshots image

Desktop (please complete the following information):

Additional context The issue arises due to a mismatch between the Java version used to compile the classes and the maximum supported version by the build tools. The build tools only support up to Java 14, while the classes were compiled with Java 21. To resolve this, ensure that all class files are compiled using Java 8 or Java 14. Reconfigure your development environment to use a compatible Java version, and update the JAVA_HOME environment variable to point to the correct JDK installation.

bigraymasoom commented 1 week ago

App inventor build system supports Java 8.

doxuanhop commented 2 days ago

I downloaded java 8 version and installed them

doxuanhop commented 2 days ago

I installed Java 8 JDK version 8u202 but when running rush I get the above error

bigraymasoom commented 2 days ago

Check if there is any Library you are working with is using that java.