因此,我最近将我的expo更新到了"expo": "^48.0.17"
,将react-native更新到了"react-native": "0.71.8"
,它们都是最新版本
现在,当我运行expo run:android
来构建我的项目并在模拟器上运行它时,我得到了这个错误消息
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:
project ':react-native-google-mobile-ads' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.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.
* Get more help at https://help.gradle.org
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.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1m 12s
5 actionable tasks: 5 up-to-date
C:\Users\admin\Documents\xulucreatives\backup\K53Learners\android\gradlew.bat exited with non-zero code: 1
Error: C:\Users\admin\Documents\xulucreatives\backup\K53Learners\android\gradlew.bat exited with non-zero code: 1
at ChildProcess.completionListener (C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\spawn-async\src\spawnAsync.ts:65:13)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.cp.emit (C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1091:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
...
at spawnAsync (C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\spawn-async\src\spawnAsync.ts:26:19)
at spawnGradleAsync (C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\src\commands\run\android\spawnGradleAsync.ts:83:18)
at assembleAsync (C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\src\commands\run\android\spawnGradleAsync.ts:57:16)
at actionAsync (C:\Users\admin\AppData\Roaming\npm\node_modules\expo-cli\src\commands\run\android\runAndroid.ts:143:9)
1条答案
按热度按时间uqxowvwt1#
这里的错误说依赖项“react-native-google-mobile-ads”使用kotlin-gradle-plugin版本1.6.10,但您的项目需要最低版本1.6.20。(此文件在您的app build.gradle的Android项目中可用)。
我建议你检查一下依赖关系是否是最新的。如果它是,你的应用程序不能没有它的功能,我会降级的项目。如果您的应用在没有它的情况下也能正常工作,请删除依赖项。