[Solution] The react native Android environment reports an error "Module was compiled with an incompatible version of Kotlin."

After importing the sdk, the compilation error is as follows:

/Users/xx/.gradle/caches/transforms-3/11e75dd86701e7f1a0f25e831b584232/transformed/jetified-react-native-0.70.4-debug-api.jar!/META-INF/ReactAndroid_debug.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.1.15.

Solution:

        Add in buildScript ext of project build.gradle

kotlinVersion = "1.6.0"

As shown in the picture:

 

Guess you like

Origin blog.csdn.net/Leisurely94/article/details/127651636