构建失败,出现异常反应本机 [英] Build failed with an exception react native

查看:112
本文介绍了构建失败,出现异常反应本机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当运行react-native run-android时,我得到以下异常...运行得很好,我做了 git pull 并做了npm ci,之后就来了.新的拉动也没有变化.实际上,对于做完git Colon之后的人来说,也是同样的问题.而且它在MAC中运行良好.请帮助我被卡住.

while running react-native run-android I am getting below exception... It was running fine and I made a git pull and did npm ci and after that, it is coming. There are no changes in the new pull also. In fact for after doing git colon that is also the same issue. And it's running well in MAC. Please help I am stuck.

失败:构建失败,并出现异常.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
        is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
        Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:13:5-33:19 to override.

* 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 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 5s
128 actionable tasks: 3 executed, 125 up-to-date
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.

谢谢

推荐答案

我解决了这个问题

npm uninstall react-native-device-info

然后

npm install --save react-native-device-info

最新版本应为2.1.2

latest version should be 2.1.2

这篇关于构建失败,出现异常反应本机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆