skip to Main Content

For some reason, Im getting this issue (build was working fine yesterday):

When I run npx react-native run-android

Im getting:

Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Execution failed for task ':expo-modules-core:compileDebugKotlin'.

In terminal im also seeing this:

Class 'kotlin.Unit' 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’ve seen some solutions online like this. So iv added the kotlin version 1.4.1 and im getting this error when I gun gradle clean:

* What went wrong:
A problem occurred configuring root project 'ProjectName'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.1.
     Searched in the following locations:
   - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.1/kotlin-gradle-plugin-1.4.1.pom
   - https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.1/kotlin-gradle-plugin-1.4.1.pom
   - https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.1/kotlin-gradle-plugin-1.4.1.pom
 Required by:
     project :

Not sure why this build has started failing. any ideas?

2

Answers


  1. have you initiated your projects with "expo init" command or by using npx?

    Login or Signup to reply.
  2. Check out
    https://github.com/facebook/react-native/issues/35210

    On November 4th 2022 a new React Native version got published which is causing some build issues.

    This event resulted in build failures for Android on several users as they ended up downloading the wrong React Native version (0.71.0-rc0 instead of the version they were using in their project, say 0.68.0).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search