dagomni
03/19/2020, 12:17 PMjava.lang.NoSuchMethodError: No static method setContent(Landroid/app/Activity;Lkotlin/jvm/functions/Function0;)Landroidx/compose/Composition; in class Landroidx/ui/core/WrapperKt; or its super classes
Does anyone have any idea why this happens when calling setContent { }?
I have tried:
• 0.1.0-dev05, dev06 and dev07
• Kotlin 1.3.61 and 1.3.70
• with and without buildFeatures { compose true } and/or composeOptionsLeland Richardson [G]
03/19/2020, 4:07 PMsetContent(Landroid/app/Activity;Lkotlin/jvm/functions/Function0;)Landroidx/compose/Composition
Is the signature that the kotlin compiler would normally look for. With our plugin, however, it should instead be looking for:
setContent(Landroid/app/Activity;Lkotlin/jvm/functions/Function1;)Landroidx/compose/Composition
This exists and will be found.
The fact that you’re looking for the wrong one suggests one of:
1. you are running the kotlin compiler on your code without our plugin
2. you are running the kotlin compiler on your code with an older version of our plugin
Can you send me your build.gradle?dagomni
03/19/2020, 5:26 PMext {
kotlinVersion = '1.3.61'
jetpackComposeVersion = "0.1.0-dev07"
reaktiveVersion = "1.1.10"
ktorVersion = "1.3.1"
coroutinesVersion = "1.3.3-native-mt"
klockVersion = "1.8.4"
serializationVersion = "0.14.0"
//also tried kotlin 1.3.70 + serialization 0.20.0 in case it was something related to this - no luck
multidexVersion = '2.0.1'
}
It's the same thing when I play with different versions of Kotlin/Compose, removing androidx.compose:compose-runtime/compiler from dependencies etc, I think I've tried every possible combinationSamuel Michael
03/19/2020, 6:55 PMandroid {
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dagomni
03/19/2020, 10:18 PMLeland Richardson [G]
03/19/2020, 10:29 PMdagomni
03/19/2020, 10:40 PMLeland Richardson [G]
03/19/2020, 10:42 PMdagomni
03/19/2020, 10:49 PMLeland Richardson [G]
03/19/2020, 11:59 PMproject.tasks.withType(KotlinCompile::class.java).configureEach { compile ->
compile.kotlinOptions.freeCompilerArgs +=
listOf("-P", "plugin:androidx.compose.plugins.idea:enabled=true")
2)
compile.kotlinOptions.freeCompilerArgs +=
"-Xplugin=${/* path to compose compiler plugin jar */}"
3)
compile.kotlinOptions.freeCompilerArgs += "-Xuse-ir"
It might take some finessing to get right but that’s about the size of itdagomni
03/20/2020, 8:13 AMjava.lang.AssertionError: org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationResolveExtension caused LinkageError
Caused by: java.lang.NoSuchMethodError: org.jetbrains.kotlin.descriptors.impl.TypeParameterDescriptorImpl.createWithDefaultBound(Lorg/jetbrains/kotlin/descriptors/DeclarationDescriptor;Lorg/jetbrains/kotlin/descriptors/annotations/Annotations;ZLorg/jetbrains/kotlin/types/Variance;Lorg/jetbrains/kotlin/name/Name;ILorg/jetbrains/kotlin/storage/StorageManager;)
Leland Richardson [G]
03/20/2020, 3:16 PMUgi
04/03/2020, 5:20 PMUgi
04/03/2020, 5:20 PMe: java.lang.AbstractMethodError: org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationLoweringExtension.generate(Lorg/jetbrains/kotlin/ir/declarations/IrFile;Lorg/jetbrains/kotlin/backend/common/BackendContext;Lorg/jetbrains/kotlin/resolve/BindingContext;)V
at org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm(JvmBackendFacade.kt:86)
at org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm$default(JvmBackendFacade.kt:64)
at org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm(JvmBackendFacade.kt:52)
at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.generateModule(JvmIrCodegenFactory.kt:36)
at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.doGenerateFiles(KotlinCodegenFacade.java:47)
at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:39)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.generate(KotlinToJVMBytecodeCompiler.kt:638)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:198)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:172)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:56)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:85)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:43)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:104)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:349)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:105)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:237)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.access$compileIncrementally(IncrementalCompilerRunner.kt:37)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner$compile$2.invoke(IncrementalCompilerRunner.kt:79)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:91)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:606)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:99)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1645)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Ugi
04/03/2020, 5:20 PMLeland Richardson [G]
04/03/2020, 6:46 PMUgi
04/03/2020, 6:54 PMLeland Richardson [G]
04/03/2020, 6:56 PMUgi
04/03/2020, 6:58 PMUgi
04/03/2020, 7:17 PMLeland Richardson [G]
04/03/2020, 7:22 PM