Android Question Java and sdk problem

Mehrzad238

Member
I needed to install androidx/lifecycle/LifecycleProcessor from the SDK Manager for a library. After downloading it, I ran into an issue when trying to run the project. The error message stated:

B4X:
error: Could not load processor class file due to 'androidx/lifecycle/LifecycleProcessor has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 58.0'.

To solve this problem, I downloaded JDK 17, which worked. However, now neither the SDK Manager nor Jetify will run due to JDK 17. Any help would be greatly appreciated.
 

Mehrzad238

Member
thanks @Erel now i have a new error

B4X:
B4A Version: 12.80
Parsing code.    (0.35s)
    Java Version: 19
Building folders structure.    (0.02s)
Compiling code.    (0.71s)
Compiling layouts code.    (0.01s)
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Compiling resources    (0.06s)
Linking resources    (2.73s)
Compiling debugger engine code.    (5.25s)
Compiling generated Java code.    Error
An annotation processor threw an uncaught exception.
Consult the following stack trace for details.
java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
    at androidx.lifecycle.LifecycleProcessor.getSupportedSourceVersion(LifecycleProcessor.kt:37)
    at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.checkSourceVersionCompatibility(JavacProcessingEnvironment.java:758)
    at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:698)
    at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:823)
    at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:919)
    at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1262)
    at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1377)
    at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1234)
    at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:916)
    at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:317)
    at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:176)
    at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:64)
    at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:50)
Caused by: java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    ... 13 more

javac 19.0.2
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
If that was a copy/paste of the error message then you spelt AdditionalJar incorrectly (Erel had a typo in his reply)
 
Last edited:
Upvote 0
Top