![](/img/trans.png)
[英]Unable to install debug APK on physical device when running react-native run-android - Failed to parse APK file: /data/local/tmp/app-debug.apk
[英]React Native: Install to virtual/physical device failed
我目前正在使用 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 工作室升级 Gradle,然后尝试是否可以从 Android 工作室运行您的项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.