powervr-graphics / Native_SDK

C++ cross-platform 3D graphics SDK. Includes demos & helper code (resource loading etc.) to speed up development of Vulkan, OpenGL ES 2.0 & 3.x applications
https://docs.imgtec.com/sdk-documentation/html/introduction.html
MIT License
702 stars 197 forks source link

[BUG] Android known Issue: gradle 5.4.1 incompatibility with Java 12-13. Workaround provided. #47

Closed graptis closed 4 years ago

graptis commented 4 years ago

Description

An intermittent error may pop up when Java 12-13 is used. We have observed it on Windows but may be present in other platforms. java.lang.IllegalArgumentException: Unsupported class file major version 57 at groovyjarjarasm.asm.ClassReader.(ClassReader.java:184 [linkprotect.cudasvc.com]) at groovyjarjarasm.asm.ClassReader.(ClassReader.java:166 [linkprotect.cudasvc.com]) ... at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run [linkprotect.cudasvc.com](ThreadPoolExecutor.java:628 [linkprotect.cudasvc.com]) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run [linkprotect.cudasvc.com](ThreadFactoryImpl.java:55 [linkprotect.cudasvc.com]) at java.base/java.lang.Thread.run [linkprotect.cudasvc.com](Thread.java:830 [linkprotect.cudasvc.com])

Repro steps

The error is intermittent. It will sometimes usually occur after running a gradlew assemble which has progressed for some time, cancel or let it finish, then switch to another single example and run gradlew assemble again.

Environment

Known Workarounds

This issue can be worked around in 3 ways: 1) Install gradle 6.x and use that to build on Android instead of the gradlew scripts (run gradle assembleRelease instead of gradlew assembleRelease 2) Update the gradlew wrappers, but installing gradle 6.x and then running gradlew wrapper in each folder you want to use gradle 6.x from 3) Use Java 11 (if you do not wish to downgrade Java, a side-by-side installation can be done, where JAVA_HOME is set to the folder of the new Java 11 installation)

graptis commented 4 years ago

Fixed in 20.1 release.