I'm getting a compiler plugin error while building...
# compose
n
I'm getting a compiler plugin error while building an android project with Kotlin 1.6, Jetpack Compose 1.1.0-rc01. Does anyone know how to debug these kinds of compiler plugin errors, or have an idea what this one means?
Copy code
java.lang.IllegalStateException: Symbol for kotlin.collections/mutableMapOf|-4813910536206556932[0] is unbound
	at org.jetbrains.kotlin.ir.symbols.impl.IrBindablePublicSymbolBase.getOwner(IrPublicSymbolBase.kt:52)
	at org.jetbrains.kotlin.ir.symbols.impl.IrSimpleFunctionPublicSymbolImpl.getOwner(IrPublicSymbolBase.kt:74)
	at androidx.compose.compiler.plugins.kotlin.lower.LiveLiteralTransformer.visitCall(LiveLiteralTransformer.kt:663)

...
It looks like this should be solvable by disabling liveLiterals, but I can't figure out how to do that.
Copy code
freeCompilerArgs += ['-P', 'plugin:androidx.compose.compiler.plugins.kotlin:liveLiterals=false']
freeCompilerArgs += ['-P', 'plugin:androidx.compose.compiler.plugins.kotlin:liveLiteralsEnabled=false']
When I use this, I get this error:
Copy code
Multiple values are not allowed for plugin option androidx.compose.compiler.plugins.kotlin:liveLiterals
I fixed it by simplifying some code that looked like this:
Copy code
val x = mutableMapOf("something" to "something").apply {
    if (bool) {
        put("another", "thing")
    }
}
To this:
Copy code
val x = mutableMapOf()
x["something"] = "something"
if (bool) {
    x["another"] = "thing"
}
b
I’ve disabled live editing of literals (done in the AS preferences), and I updated the one and only instance of
mutableMap
that was written like @nschulzke mentioned above … I still get this issue.
353 Views