kanyun-inc / Kace

Kace: Kotlin Android Compatible Extensions, a framework for assisting in the seamless migration from kotlin-android-extensions
Apache License 2.0
263 stars 12 forks source link

agp7.4.1,gradle8.0,编译后报错,,帮看看是啥原因啊 #45

Closed yexingyun closed 1 year ago

yexingyun commented 1 year ago

java.lang.AssertionError: com.kanyun.kace.compiler.KaceSyntheticResolveExtension caused LinkageError at org.jetbrains.kotlin.com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:57) at org.jetbrains.kotlin.com.intellij.openapi.diagnostic.Logger.error(Logger.java:187) at org.jetbrains.kotlin.resolve.extensions.SyntheticResolveExtension$Companion$getInstance$1.generateSyntheticClasses(SyntheticResolveExtension.kt:264) at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyPackageMemberScope.getNonDeclaredClasses(LazyPackageMemberScope.kt:54) at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.doGetClasses(AbstractLazyMemberScope.kt:70) at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.access$doGetClasses(AbstractLazyMemberScope.kt:38) at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope$classDescriptors$1.invoke(AbstractLazyMemberScope.kt:49) at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope$classDescriptors$1.invoke(AbstractLazyMemberScope.kt:49) at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunction.invoke(LockBasedStorageManager.java:578) at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunctionToNotNull.invoke(LockBasedStorageManager.java:651) at org.jetbrains.kotlin.resolve.lazy.descriptors.AbstractLazyMemberScope.getContributedClassifier(AbstractLazyMemberScope.kt:77) at org.jetbrains.kotlin.resolve.scopes.ChainedMemberScope.getContributedClassifier(ChainedMemberScope.kt:35) at org.jetbrains.kotlin.resolve.scopes.AbstractScopeAdapter.getContributedClassifier(AbstractScopeAdapter.kt:44) at org.jetbrains.kotlin.resolve.LazyExplicitImportScope.getContributedClassifier(LazyExplicitImportScope.kt:45) at org.jetbrains.kotlin.resolve.LazyExplicitImportScope.getContributedDescriptors(LazyExplicitImportScope.kt:71) at org.jetbrains.kotlin.resolve.scopes.BaseImportingScope.getContributedDescriptors(Scopes.kt:167) at org.jetbrains.kotlin.resolve.scopes.ResolutionScope$DefaultImpls.getContributedDescriptors$default(ResolutionScope.kt:50) at org.jetbrains.kotlin.resolve.LazyExplicitImportScope.storeReferencesToDescriptors$frontend(LazyExplicitImportScope.kt:120) at org.jetbrains.kotlin.resolve.lazy.LazyImportResolverForKtImportDirective$forceResolveImportDirective$1.invoke(LazyImportScope.kt:172) at org.jetbrains.kotlin.resolve.lazy.LazyImportResolverForKtImportDirective$forceResolveImportDirective$1.invoke(LazyImportScope.kt:169) at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunction.invoke(LockBasedStorageManager.java:578) at org.jetbrains.kotlin.storage.LockBasedStorageManager$MapBasedMemoizedFunctionToNotNull.invoke(LockBasedStorageManager.java:651) at org.jetbrains.kotlin.resolve.lazy.LazyImportResolverForKtImportDirective.forceResolveImport(LazyImportScope.kt:231) at org.jetbrains.kotlin.resolve.lazy.LazyImportResolverForKtImportDirective$forceResolveNonDefaultImportsTask$1.invoke(LazyImportScope.kt:184) at org.jetbrains.kotlin.resolve.lazy.LazyImportResolverForKtImportDirective$forceResolveNonDefaultImportsTask$1.invoke(LazyImportScope.kt:181) at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:408) at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:527) at org.jetbrains.kotlin.resolve.lazy.LazyImportResolverForKtImportDirective.forceResolveNonDefaultImports(LazyImportScope.kt:214) at org.jetbrains.kotlin.resolve.lazy.FileScopeFactory$FilesScopesBuilder$importResolver$1.forceResolveNonDefaultImports(FileScopeFactory.kt:170) at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.resolveImportsInFile(LazyTopDownAnalyzer.kt:252) at org.jetbrains.kotlin.resolve.jvm.extensions.PartialAnalysisHandlerExtension.doAnalysis(PartialAnalysisHandlerExtension.kt:65) at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.doAnalysis(Kapt3Extension.kt:155) at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:123) at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:99) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:257) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:42) at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:115) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:248) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:88) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:47) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:168) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:53) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:100) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:46) at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101) at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:495) at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:133) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.doCompile(IncrementalCompilerRunner.kt:486) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:409) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileNonIncrementally(IncrementalCompilerRunner.kt:290) at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:112) at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:627) at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:101) at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1587) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.rmi/sun.rmi.transport.Transport.serviceCall(Unknown Source) at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Caused by: java.lang.NoClassDefFoundError: org/jetbrains/kotlin/resolve/extensions/SyntheticResolveExtension$DefaultImpls at com.kanyun.kace.compiler.KaceSyntheticResolveExtension.generateSyntheticClasses(KaceSyntheticResolveExtension.kt:34) at org.jetbrains.kotlin.resolve.extensions.SyntheticResolveExtension$Companion$getInstance$1.generateSyntheticClasses(SyntheticResolveExtension.kt:77) ... 68 more Caused by: java.lang.ClassNotFoundException: org.jetbrains.kotlin.resolve.extensions.SyntheticResolveExtension$DefaultImpls at java.base/java.net.URLClassLoader.findClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ... 70 more

Errors were stored into /Users/yezipc/AndroidStudioProjects/android-architecture-main/.gradle/kotlin/errors/errors-1692602540018.log

RicardoJiang commented 1 year ago

Kotlin 使用的是什么版本?Kace 使用的是什么版本?

yexingyun commented 1 year ago

kotlin是1.8.20,1.8.21都试过,kace是最新版本

bennyhuo commented 1 year ago

看上去可能是gradle的编译环境配置了不同的Kotlin 接口默认实现。发个demo复现一下问题吧,我们后面确认一下。

bennyhuo commented 1 year ago

这边试了一下无法复现,请提供能够复现问题的 demo 方便排查。

bennyhuo commented 1 year ago

由于没有提供足够的信息复现问题,issue先关掉了。如有更新,可以重新打开。谢谢