Hi everyone, I added Arrow on my KMP project and ...
# arrow
f
Hi everyone, I added Arrow on my KMP project and used it in the commonMain part. When I use the generated framework/aar, I’m experiencing some NoClassDefFoundError Either.kt in the android application (iOS run without any problem), if I add the Arrow dependency on android I solve the problem but asap will be rise another NoClassDefFoundError for a simple kotlin file inside the project, did somebody have the same experience or know where I should check to solve the problem?
r
Hi Francesco, no Android experience on my side with Arrow but could this be perhaps related to proguard or similar android specific config on your project?
s
It's possible that some other dependency brings in a different version of Arrow transitively. When you specify it explicitly it solves the issue. You can use
dependencyInsight
to figure out which version of Gradle is picked up by android and from where it's coming from: https://docs.gradle.org/current/userguide/viewing_debugging_dependencies.html
f
Hi Raul, I thought about it but we’re not using proguard on debug build. Another strange thing is that after adding the dependency, Android crash in a file .kt randomly, I start to think is a problem with dex and the framework aar
Now I’m trying to apply some changes on our gradle to have the same architecture of KMP plugin and avoid using aar. @stojan thank you I’ll try asap if something is using Arrow transitively.
Update: After a crazy day, I moved the project from the multiplatform .aar to the android library, like the one created from the KMM plugin. The error disappeared and arrow works smoothly.