. Advertisement .
..3..
. Advertisement .
..4..
The error: “unrecognized Attribute name MODULE (class com.sun.tools.javac.util.SharedNameTable$NameImpl)” is a common error that can show up in many ways. In this blog, we will go through some of the ways you can fix this issue. Read on.
When Do You Get The Error: “unrecognized Attribute name MODULE (class com.sun.tools.javac.util.SharedNameTable$NameImpl)”?
When attempting to upgrade your Android S project, you might get the following problem.
Caused by: java.lang.AssertionError: annotationType(): unrecognized Attribute name MODULE (class com.sun.tools.javac.util.SharedNameTable$NameImpl)
at com.sun.tools.javac.util.Assert.error(Assert.java:133)
at com.sun.tools.javac.code.TypeAnnotations.annotationType(TypeAnnotations.java:231)
How To Solve The Error: “unrecognized Attribute name MODULE (class com.sun.tools.javac.util.SharedNameTable$NameImpl)”?
Approach 1: Simply upgrade the container’s JDK version to OpenJDK-11
Java Technology is distributed by Oracle Corporation through the Java Development Kit (JDK). It provides the Java Application Programming Interface Standard Edition (SE) and implements the Java Virtual Machine Specification (JVMS) and Java Language Specification (JLS), respectively (API). It is an offshoot of the Oracle-managed open-source OpenJDK. It provides tools for communicating with Java programs. Software that is supplied includes the virtual machine, a compiler, performance tracking tools, a debugger, and other tools that Oracle deems useful for Java programmers.
To upgrade the JDK version of the container to OpenJDK-11 is the simplest and most straightforward approach for you to solve the error “unrecognized Attribute name MODULE (class com.sun.tools.javac.util.SharedNameTable$NameImpl)”. After doing that, your error will be completely resolved.
Approacch 2: Upgrade your gradle jdk in AS Arctic Fox
Upgrading your gradle jdk in AS Arctic Fox is not a bad solution for you to resolve your issue “unrecognized Attribute name MODULE (class com.sun.tools.javac.util.SharedNameTable$NameImpl)”.
First, in AS Arctic Fox let’s upgrade your gradle jdk by the following steps:
Settings > Build, Execution, Deployment > Build Tools > Gradle > Gradle JDK
Conclusion
We hope you enjoyed our article about the error. With this knowledge, we know that you can fix your error: “unrecognized Attribute name MODULE (class com.sun.tools.javac.util.SharedNameTable$NameImpl)” quickly by following these steps! If you still have any other questions about fixing this syntax error, please leave a comment below. Thank you for reading!
Read more
Leave a comment