I received the below error when trying to build my project from my expo-app-auth/android/build.grandle. how to clear this error when building? I think I've tried almost all solutions found online.
> Configure project :react-native-reanimated
AAR for react-native-reanimated has been found
/home/expo/workingdir/build/node_modules/react-native-reanimated/android/react-native-reanimated-71-hermes.aar
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:
project ':expo-app-auth' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21
* Try:
> Run with --stacktrace option to get the stack trace.
repositories {
maven {
url = uri("https://plugins.gradle.org/m2/")
}
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21")
}
}
apply(plugin = "org.jetbrains.kotlin.android")
This issue could be fixed by upgrading from expo 48 to expo 49.
To upgrade the project run these two commands:
npm install expo@^49.0.6
npx expo install --fix
The second command is important because it will auomatically upgrade react-native from 0.71.* to 0.72.*
See the official docs for more details.