[英]React Native Error Occur, Someone Know About This Error
此版本中使用了已弃用的 Gradle 功能,使其与 Gradle 8.0 不兼容。
您可以使用“--warning-mode all”来显示各个弃用警告并确定它们是否来自您自己的脚本或插件。
请参阅https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings 5 个可操作任务:5 个最新
失败:构建失败,出现异常。
其中:构建文件 'D:\React Native Applications\FirstProject\android\app\build.gradle' 行:240
出了什么问题:配置项目“:app”时出现问题。
groovy.lang.MissingPropertyException:没有这样的属性:class 的 ABI:org.gradle.api.tasks.OutputFile
使用 --stacktrace 选项运行以获取堆栈跟踪。 使用 --info 或 --debug 选项运行以获取更多日志 output。使用 --scan 运行以获取完整的见解。
17 秒内构建失败
错误无法安装应用程序。 确保您已设置 Android 开发环境: https://reactnative.dev/docs/environment-setup 。 错误:命令失败:gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
失败:构建失败,出现异常。
其中:构建文件 'D:\React Native Applications\FirstProject\android\app\build.gradle' 行:240
出了什么问题:配置项目“:app”时出现问题。
groovy.lang.MissingPropertyException:没有这样的属性:class 的 ABI:org.gradle.api.tasks.OutputFile
使用 --stacktrace 选项运行以获取堆栈跟踪。 使用 --info 或 --debug 选项运行以获取更多日志 output。使用 --scan 运行以获取完整的见解。
17 秒内构建失败
at makeError (D:\React Native Applications\FirstProject\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at D:\React Native Applications\FirstProject\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (D:\React Native Applications\FirstProject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\React Native Applications\FirstProject\node_modules\@react-native-community\cli\build\index.js:142:9)
info 使用 --verbose 标志运行 CLI 以获取更多详细信息。
请提供有关此错误的解决方案
因此,如果您的项目在 React-Native 应用程序中出现此类错误,只需打开 android/app/build.gradle 行:240,删除此行 def abi = output.getFilter(OutputFile.ABI)
并通过以下代码。 def abi = output.getFilter(com.android.build.OutputFile.ABI)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.