I have an application in Xamarin, that when trying to compile for Android 12, throws the following error:
java.lang.AssertionError: annotationType() : unrecognized Attribute name MODULE (class com.sun.tools.javac.util.SharedNameTable$NameImpl)
I tried the solution of this post, and it didn't work
https://stackoverflow.com/questions/68344424/unrecognized-attribute-name-module-class-com-sun-tools-javac-util-sharednametab
java version:
openjdk version "11.0.14" 2022-01-18 LTS
OpenJDK Runtime Environment Microsoft-30257 (build 11.0.14+9-LTS)
OpenJDK 64-Bit Server VM Microsoft-30257 (build 11.0.14+9-LTS, mixed mode)
any idea what else it could be?
PS: sorry for my english
trying to compile for Android 12
Based your screenshot, your target framework is Android 11. Please re-select the Repository in the Android SDKs and Tools. Change the SDK Manager from Microsoft-managed repository to use Google's repository.
Then install Android 12 SDK Platform 31 in the Android SDKs and Tools, after that, you can select Android 12 S in your Compile Using Android version(Target Framework ).
If you want to change JDK 11 in Visual Studio, Please refer to this thread: Install JDK-11 and Configure Visual Studio to use JDK-11 step by step.
After above ways, please rebuild your application.
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Hello, today I am going to try the solution that you gave me, and I will be answering. Sorry for the delay.
Thanks