英文:
Cannot run android app using expo because of Kotlin Gradle plugin version conflict
问题
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?
英文:
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?
答案1
得分: 1
- 你可以通过分叉 https://github.com/crossplatformkorea/react-native-kakao-login 来解决这个问题。
- 更改 kotlin-gradle 插件的版本。
- 将你的分叉添加到你的 package.json 中。
英文:
You can solve this by:
- You can fork https://github.com/crossplatformkorea/react-native-kakao-login
- Change kotlin-gradle plugin version
- Add your fork to you package.json
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论