【发布时间】:2021-04-07 11:38:38
【问题描述】:
我目前正在使用 React Native 来编写我最后一年的项目。我在构建并将其安装到虚拟/物理设备时遇到问题虽然一个月前它运行良好。有人可以向我解释我的代码或文件有什么问题吗?它会损坏吗?因为我试图创建一个空白的新文件,我仍然得到同样的错误。
我的错误:
> Task :app:processDebugResources FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
183 actionable tasks: 2 executed, 181 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\minht\SmartRoom\node_modules\react-native-image-crop-picker\android\build\intermediates\library_manifest\debug\AndroidManifest.xml:10:5-14:15: AAPT: error: unexpected element <queries> found in <manifest>.
* 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
BUILD FAILED in 11s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
【问题讨论】:
-
尝试删除android->app->build中的build文件夹并再次运行。
-
我仍然得到相同的
Task :app:processDebugResources FAILED错误:( -
在我更改build.gradles并重新安装所有node_modules后,问题变为
Task :app:stripDebugDebugSymbols FAILED和Task :app:mergeDexDebug FAILED
标签: android node.js react-native npm