ACRA/acra

Kotlin Compile Version Mismatch

BiswajitBharati opened this issue · 6 comments

I am getting below error after integrating and run the project.

/Users/username/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.9.10/dafaf2c27f27c09220cee312df10917d9a5d97ce/kotlin-stdlib-common-1.9.10.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.

Sounds like you either need to update kotlin or acra or both

@F43nd1r this is going to be a widespread problem across android dev ecosystem with newer kotlin+gradle+android-gradle-plugin - this used to be a warning but they turned it into an error now

I finally just had to do this after upgrading android gradle plugin / gradle / kotlin while filing an internal ticket to troubleshoot and solve for real - added in gradle.properties at top level:

# Needed after Gradle 8 if there are incompatibilities, default is error
kotlin.jvm.target.validation.mode=warning

https://kotlinlang.org/docs/gradle-configure-project.html#check-for-jvm-target-compatibility-of-related-compile-tasks

@mikehardy that link looks like it's about jvm version, while the error by OP reads like a kotlin version incompatibility. Are you sure it's the same thing?

I see what you're saying, but as observed data that's the toggle that allows the build to succeed in previous style (where there may be subtle bugs but in practice it's working well enough while everyone makes libraries and modules compatible etc)

So what actions would you propose @mikehardy? Update the FAQ? Sorry I haven't been active in the android app scene for four years now so I rely on input.

Although I found the right toggle to delay the inevitable reconciliation of kotlin versions that needs to happen, it is possible to find that answer by searching (as I did) and it's not really a great answer. I don't think it rises to the level of a FAQ entry - either by how often I see it happening here (at least for now) and the quality of the answer (which is pretty low IMHO, and it's my own answer 😆)