我在运行项目时发现一个错误,我试图寻找许多示例,但都失败了,以下是错误的细节:

D:\myApp\android\app\src\debug\AndroidManifest.xml:22:18-91 Error:
        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:7:5-117 to override.

See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.


> Task :app:processDebugManifest FAILED

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:7:5-117 to override.

请任何人帮我解决这个问题.

谢谢

推荐答案

我有更多依赖gcm的库(deviceinfo除外),所以我用这个来解决这个问题:https://stackoverflow.com/a/56648987/8306924

React-native相关问答推荐

如何停止在Expo路由中将新文件显示为菜单列表?

REACT-Native-Render-html中所有文本的默认字体大小

领带麦克风在Reaction-Native-Incall-Manager中不工作

React Native 中的视图与 Flex 不占用相同的高度空间

导航堆栈不显示

哪个版本的@stripe/stripe-react-native 模块支持 react native 0.62.0 typscript 模板?

无法在 M1 zsh 上运行 adb segmentation fault adb

使用 React Native 正确处理注销

如何在 react native 中以 redux 形式设置隐藏字段?

从 .apk 到 .aab 的本地构建版本react,如何将应用程序发送给客户端?

如何在 Crashlytics (Fabrics) 中有效地对非致命异常进行分组?

如何在 React Native 中按下按钮时更改文本值?

如何使 React Native Animated.View 可点击?

react-native Bottom Up drawer

查找文本输入框和按钮字段的资源名称以响应本机 android 应用程序

react-native平面列表初始滚动到底部

Super expression must either be null or a function, not undefined

将 async 和 await 与 export const 一起使用

xcode 使用错误的 node.js 版本

React Native 多行TextInput,文本居中