Android 任务';的执行失败:应用程序:processDebugManifest';-自然反应

Android 任务';的执行失败:应用程序:processDebugManifest';-自然反应,android,react-native,Android,React Native,尝试在Android中构建React本机项目时,我收到以下错误。 解决办法如下:1。Manifest.XML中的tools:replace=“android:appComponentFactory”和android.useAndroidX=true,android.enableJetifier=true不起作用 > Task :app:processDebugManifest FAILED /Users/infinitesolution/Desktop/Infinite-Master/Pr

尝试在Android中构建React本机项目时,我收到以下错误。 解决办法如下:1。Manifest.XML中的tools:replace=“android:appComponentFactory”和android.useAndroidX=true,android.enableJetifier=true不起作用

> Task :app:processDebugManifest FAILED /Users/infinitesolution/Desktop/Infinite-Master/Projects/ReactNative/Ruci/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.


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.

* 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.

请为这个问题添加任何可能的解决方法

在过去两天中,我们一直面临这个问题。许多其他答案提到使用
react native device info
更新版本。但这对我的案子不起作用

主要原因是google play服务和firebase更新导致React本机构建失败

我终于成功地完成了构建,在这里我分享了

更改了上述要点链接中提到的以下文件列表

android/build.gradle:
build.gradle:
gradle.properties:
package.json
gradle-wrapper.properties
最后使用了这个软件包

npm i jetifier && npx jetify
一旦完成,最后运行

react-native run-android
使建造成功


提示:在尝试修复之前,请使用
/gradlew clean
。希望有帮助

刚刚添加到gradle.properties中:

android.enableJetifier=true
android.useAndroidX=true

然后运行
npm i-jetifier&&npx-jetifi
然后
react native run android
它对我有效:)

谢谢。我不使用设备信息。在这些步骤之后,Fast image导致了我的问题。所以我删除了fast image然后它就工作了。
android.enableJetifier=true
android.useAndroidX=true