android 33 upgrade stepping pit 2

Encounter problems

After upgrading the gradle related configuration, the compilation reminds java compilation exception
An exception has occurred in the compiler (1.8.0_271). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
06:54:28 java.lang.AssertionError: annotationType(): unrecognized Attribute name MODULE (class com.sun.tools.javac.util.UnsharedNameTable$NameImpl)

I always thought it was caused by a gradle version mismatch and entered a misunderstanding. The root cause is that the JDK version of the compilation dependency does not match.
android 33
gradle-build-tool :3.6.4
The gradle-wrapper.properties version requires a minimum of 5.6.4

If you use android studio, you need to check the gradle jdk configuration
file-->settings-->Build,Execution,Deployment-->build Tools-->Gradle-->Gradle JDK
JDK installation path xx\xx\xx\jdk-11.0.17

Guess you like

Origin blog.csdn.net/ff_hh/article/details/128083222