So, I'm working on one large existing company project, where things are old / deprecated and I'm trying to improve it step by step.
Right now I'm trying to update JDK version from Java 1.8 to Java 11. So I made changes from Android Studio preference settings.
Also I made this changes as well: https://developer.android.com/studio/releases/gradle-plugin#java-11
About my project:
targetSDKVersion: 30
Android Studio: Latest stable release
Project codeing: 50% code Java and 50% code Kotlin
So, when I made above 2 change and sync the project, it got successfully sync and when I try to run this this exception is coming.
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
at java.base/java.lang.Class.getConstructor0(Class.java:3342)
at java.base/java.lang.Class.newInstance(Class.java:556)
Execution failed for task ':app:kaptPlaystoreDebugKotlin'.
> Internal compiler error. See log for more details
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:kaptPlaystoreDebugKotlin'
NOTE: playstoreDebug is a build variant name.