I created an expo project and ran expo run:android
.
And android project is built, but Gradle fails due to a version conflict.
This is the message that I got.
> Configure project :react-native-reanimated
No AAR for react-native-reanimated found. Attempting to build from source.
Android gradle plugin: 7.4.1
Gradle: 7.5.1
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
FAILURE: Build failed with an exception.
* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
root project '(app name)' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
I can directly fix build.gradle
file to resolve this issue.
But, this approach will still create build fails for eas build, because prebuilt files will not be changed.
How can I make expo to create android files with correct gradle plugin version?
You can solve this by: