I have a multi-module project. With the same build, the apk's size may differ by 300KB
(from 17 to 17.3MB)
. In the build with 17MB
in runtime I get an error:
java.lang.AssertionError: Built-in class kotlin.Any is not found.
Also in the project, obfuscation is configured. But I don’t think it’s caused by this. Clean and Invalidate and Restart do not always help.
I encountered this issue, made sure Kotlin stdlib and reflect libraries have the same version, updated Gradle to make sure its not the build too, tried different Kotlin versions as well, but nothing worked. Eventually, I found out that my packageOptions
is excluding a Kotlin folder
packagingOptions {
exclude '**/kotlin/**'
}
Have no idea why this code was there, but removing it solves the problem for me! So definitely check your packageOptions
in your module-level build.gradle
file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With