【问题标题】:React Native: Install to virtual/physical device failedReact Native:安装到虚拟/物理设备失败
【发布时间】: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 FAILEDTask :app:mergeDexDebug FAILED

标签: android node.js react-native npm


【解决方案1】:

似乎您需要从 Android Studio 升级 Gradle,然后尝试是否可以从 Android Studio 运行您的项目。

【讨论】:

  • 我尝试使用最新的 Gradle,但仍然无法使用 xd...
猜你喜欢
  • 2016-08-16
  • 2017-01-26
  • 1970-01-01
  • 1970-01-01
  • 2021-10-03
  • 2021-09-16
  • 1970-01-01
  • 1970-01-01
  • 2021-06-11
相关资源
最近更新 更多