Closed KiranRadish closed 1 year ago
You might be running into a build cache error. If this is the case, cd android && ./gradlew clean
should resolve.
Alternatively, if you have other dependencies that use kotlin and/or use kotlin in your main project, they may be trying to pull in different kotlin versions. In android/build.gradle
, set
buildscript {
ext {
// [...]
kotlinVersion = "1.8.10" // Or preferred version.
// [...]
This library will read your ext.kotlinVersion
and change its internal build accordingly. (Other libraries will *probably* read it also, but they are not guaranteed to do so.)
Assuming resolved.
react-native: "0.71.2" react-native-file-access: 2.5.3 Platform:
Android
Bug A clear and concise description of what the bug is. While generating release apk i am getting errors
To reproduce Describe how to trigger this bug. generate release apk
Details Logs, code snippets, screenshots, extended bug description.
node_modules/react-native-file-access/android/build/.transforms/ba5c59326539780ce213966ce792062f/transformed/out/jars/classes.jar!/META-INF/react-native-file-access_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.8.10/6d5560a229477df9406943d5feda5618e98eb64c/kotlin-stdlib-1.8.10.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.