ajbaskar
ajbaskar

Reputation: 11

Module was compiled with an incompatible version of Kotlin in react native

React native android getting error /Users/jeyabaskar/.gradle/caches/transforms-2/files-2.1/03b7bffa42f2fb741f03fe69f60fdec1/jetified-kotlin-stdlib-jdk8-1.6.10.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.

I'm using macbook m1. while run the android app i'm getting this error.

Upvotes: 1

Views: 1495

Answers (2)

Tyler Forsythe
Tyler Forsythe

Reputation: 1551

It looks like this is an official React Native problem and they have posted a GitHub issue for resolution here: https://github.com/facebook/react-native/issues/35210

It also includes an explanation of what happened.

It is lengthy so I'm not going to copy-paste, but basically there is a hotfix available for several versions of React Native (0.63 to 0.70), and a work-around fix if using a version that is too old to receive a hotfix.

Upvotes: 2

Layeb Mazen
Layeb Mazen

Reputation: 161

i think you need to change your kotlin version in android/build.gradle

buildscript {
    ext {
      kotlinVersion = "1.6.0"
     ...
    }
  ...
}

  

Upvotes: 0

Related Questions