Problem is not the object or runtime, seems something off with java SDK version
An exception has occurred in the compiler (1.8.0_341). 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.
java.lang.AssertionError: annotationType(): unrecognized Attribute name MODULE (class com.sun.tools.javac.util.UnsharedNameTable$NameImp l)
Can you help me to test something different in your case?
Reduce to version 332 or 331 (original java from Oracle) or install OpenJDK from here https://www.openlogic.com/openjdk-downloads
it is becoming now, more than ever that android prefers to use their OpenJDK (the one that comes with android studio) instead of using java from oracle