1

I knew this same topic with this but there is difference how i produce the error and also that thread still not proven yet (until right now). The case started since i had error in gradle building, that problem was "resource linking-fails on lstar" and i found the solution here by upgrading androidx:core:core-ktx to 1.6.0 and pushing compileSdkVersion and targetSdkVersion into version 31. Until that point everything is fine my build was successful. But, the new case happened when i rebuild project. It's failed and shows this error in Build Output:

Caused by: java.lang.AssertionError: annotationType(): unrecognized Attribute name MODULE (class com.sun.tools.javac.util.SharedNameTable$NameImpl)
    at com.sun.tools.javac.util.Assert.error(Assert.java:133)
    at com.sun.tools.javac.code.TypeAnnotations.annotationType(TypeAnnotations.java:231)
    at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.separateAnnotationsKinds(TypeAnnotations.java:294)
    at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.visitMethodDef(TypeAnnotations.java:1066)
    at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:778)
    at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
    at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.scan(TypeAnnotations.java:275)
    at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
    at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.visitClassDef(TypeAnnotations.java:1042)
    at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:693)
    at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
    at com.sun.tools.javac.code.TypeAnnotations$TypeAnnotationPositions.scan(TypeAnnotations.java:275)
    at com.sun.tools.javac.code.TypeAnnotations$1.run(TypeAnnotations.java:127)
    at com.sun.tools.javac.comp.Annotate.flush(Annotate.java:152)
    at com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:129)
    at com.sun.tools.javac.comp.Enter.complete(Enter.java:512)
    at com.sun.tools.javac.comp.Enter.main(Enter.java:471)
    at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:982)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.enterTrees(JavacProcessingEnvironment.java:1023)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.<init>(JavacProcessingEnvironment.java:910)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.next(JavacProcessingEnvironment.java:929)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1195)
    at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
    at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1068)
    at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:78)
    at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing$default(annotationProcessing.kt:34)
    at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.runAnnotationProcessing(Kapt3Extension.kt:229)
    at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:192)
    at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:100)
w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:

error

Please someone help me

Nanda Z
  • 1,604
  • 4
  • 15
  • 37
  • Thanks for adding the information, could you sync the project files with gradle but do not rebuild, try to sync and then close the studio program, re launch it and sync again, the build, it seems that the new installation is not matching the old framework attached to it (1.6.0 may have different links to the old build sync with gradle maybe) –  Sep 06 '21 at 03:54
  • @jbsidisJosuéCarranza thanks for your response, i followed that steps but still had same error when building – Nanda Z Sep 06 '21 at 04:02
  • I have found solution for this case. I just need to upgrade Android studio to Arctic Fox. This error causes by jdk version are not compatible with my current dependencies. It required openjdk-11 which automatically inherited when installing AS archtic fox. – Nanda Z Sep 06 '21 at 09:51
  • That's great to know, it was not an easy issue, I will take it in consideration also for development, thank you for sharing the solution –  Sep 06 '21 at 23:32

0 Answers0