MIP*_*IPB 15 react-native react-navigation react-native-screens
我正在尝试在我的 RN 项目中使用 React Navigation,但是当我安装react-native-screens(这是它工作所需的包)时,我无法再次构建该项目。
我得到的错误如下:
Task :react-native-screens:compileDebugKotlin FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
Run Code Online (Sandbox Code Playgroud)
我尝试了一些我看到其他人做的事情,但到目前为止没有任何效果。
你能帮助我吗?谢谢
小智 17
我在 android/build.gradle 中将 kotlin 版本更改为 kotlinVersion = "1.5.31"
Ish*_*han 12
如果您在将@react-navigation/native@6.0.10库添加到项目后react-native @0.69.0仅升级react-native-screens@3.14.0此特定版本后遇到此问题
lak*_*ath 12
更新 android/build.gradle 如下:
{
buildscript {
ext {
...
kotlinVersion = "1.5.31"
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31"
}
}
}
Run Code Online (Sandbox Code Playgroud)
注意:如果再次出现此错误,请从模拟器中卸载应用程序并重新构建,或者删除此模拟器并创建新的模拟器并尝试。
| 归档时间: |
|
| 查看次数: |
37588 次 |
| 最近记录: |