Hey guys. I’m running into a particular issue afte...
# compiler
t
Hey guys. I’m running into a particular issue after updating the Kotlin plugin in AS to 1.5.20. The surrounding code is probably irrelevant, it’s the same error appearing in multiple occurrences of such code. I got a data class that looks like this:
Copy code
data class MapObjects(
    val map: com.google.android.gms.maps.GoogleMap,
    val markerManager: com.google.maps.android.collections.MarkerManager,
    val markerCollection: com.google.maps.android.collections.MarkerManager.Collection,
)
The
MarkerCollection.Collection
is a Java nested/inner class, not a static one. After the update to Kotlin 1.5.20 (keeping runtime dependencies on 1.5.0), it compiles, but IDE complains about code like this:
Copy code
val mapObjs: MapObjects = mapObjects // lateinit var access
mapObjs.markerCollection.clear()
Basically anything accessing the
markerCollection
shows
Internal Error occurred while analyzing this expression
. I reported it from within IDE already. Funny detail though: when I update runtime dependency to 1.5.20, it outright crashes while compiling:
org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during file facade code generation
. Based on that I do not believe it’s related to Android Studio in particular. Please send help, and if I should, include where/how do I file this in the Kotlin’s issue tracker at https://youtrack.jetbrains.com/issues/KT.
r
Definitely report an issue, probably for the 1.5.20 version. If you can attach your project or a smaller reproducer it helps. Just include as much information as you can, the JetBrains team will triage it.
t
@rnett alright, thank you, will do when I get a moment
In the meanwhile, downloading 1.5.0 version of the plugin and installing it from disk resolves the issue. But that is a meh solution.
https://youtrack.jetbrains.com/issue/KT-47459 same issue, seems to be resolved in 1.5.21