Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save patharanordev/955b8a9effa3a8ff8cfcd657f6f128a7 to your computer and use it in GitHub Desktop.
Save patharanordev/955b8a9effa3a8ff8cfcd657f6f128a7 to your computer and use it in GitHub Desktop.
React Native | fixing The Android Gradle plugin supports only kotlin-android-extensions Gradle plugin version x.y.z and higher

React Native : kotlin-android-extensions Gradle plugin version x.y.z and higher

Example error log :

...
BUILD FAILED in 31s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only kotlin-android-extensions Gradle plugin version 1.6.20 and higher.
The following dependencies do not satisfy the required version:
...

Fixed by adding specific Kotlin version or higher to kotlinVersion :

buildscript {
    ext {
        buildToolsVersion = "..."
        kotlinVersion = "x.y.z"
        
        // ...
    }
    
    // ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment