Klaas Kabini

01/31/2020, 4:00 AM
I have updated my project from 0.1.0-dev03 to 0.1.0-dev04 including updating to new API changes that comes with 0.1.0-dev04 and now I am getting the following error. It was working fine on 0.1.0-dev03 prior to this update. Does anyone has an idea of what might be thee root cause of this error?
Copy code
java.lang.IllegalStateException: Backend Internal error: Exception during code generation
Element is unknownThe root cause java.util.NoSuchElementException was thrown at: androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.irComposableExpr(ComposableCallTransformer.kt:1362)
	at org.jetbrains.kotlin.codegen.CompilationErrorHandler.lambda$static$0(
	at org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm(JvmBackendFacade.kt:93)
Caused by: java.util.NoSuchElementException: Collection contains no element matching the predicate.
	at androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.irComposableExpr(ComposableCallTransformer.kt:1362)
	at androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.visitBlock(ComposableCallTransformer.kt:252)

Joseph Cheng

01/31/2020, 4:40 AM
add these codes on your app/build.gradle
Copy code
android {
    composeOptions {
        kotlinCompilerExtensionVersion "0.1.0-dev04"

Klaas Kabini

01/31/2020, 6:59 PM
Thanks @Joseph Cheng. the compose options solved the exception.
👍 1