Our company builds and deploys a product via Ionic Framework.
Recently we upgrades cordova-android plugin in our cordova app to version 10.1.0 and targetSdk to 31. We have an issue with building at latest build stack, because of Java assertion error:
An exception has occurred in the compiler (1.8.0_312). 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$NameImpl)
Locally I have been able to resolve this issue by setting JAVA_HOME env variable to Java 11 location. I have not been able to do this on Ionic Framework. Is there any way to tell builder to use Java 11 at build?