Hello everyone, we found a strange issue migrating...
# android
t
Hello everyone, we found a strange issue migrating from Kotlin 1.2.51 to 1.2.60 (always present with AGP 3.1.3, 3.1.4, 3.2.0-beta04 and 3.2.0-beta05, and android extensions plugin):
Copy code
exception: java.lang.ClassCastException: java.util.Collections$UnmodifiableCollection cannot be cast to java.util.Set
    at org.jetbrains.kotlin.android.synthetic.AndroidComponentRegistrar.registerProjectComponents(AndroidComponentRegistrar.kt:154)
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.<init>(KotlinCoreEnvironment.kt:179)
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.<init>(KotlinCoreEnvironment.kt:117)
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createForProduction(KotlinCoreEnvironment.kt:413)
I couldn't really find anything on the web, we tried to refactor away some problematic libraries like Guava, but no luck 😕
g
@myanmarking also had this problem Don’t know, does he solve it or not
Looks like some incompatibility with Android plugin, I would check that you have 1.2.60 plugin in all your plugins
Also work for me on 3.2.0-beta05
t
I'll try with beta06 right now, I did not get an update so far
g
sorry, bet05, just mistyped
t
Thanks @gildor - I honestly have no idea on which other library can interfere with Kotlin 1.2.60
g
It’s not a library, it’s some error during build. Problem of Kotlin Plugin for Android
j
Are you using any annotation processor?
g
Looks like something related to android-extensions
t
@JoseF not in the module that crashes the build - @gildor I couldn't tell, we had the same feeling, but it's complex to pin point the source of the issue
👍 1
I found the solution... We were using
kotlin-stdlib-jdk7
in one of the modules, switching to
kotlin-stdlib
fixed the issue.