简体   繁体   English

任务执行失败':app:processDebugManifest' - React Native

[英]Execution failed for task ':app:processDebugManifest' - React Native

I receive the following error when try to build React Native project in Android. 尝试在Android中构建React Native项目时收到以下错误。 Workarounds like: 1. "tools:replace="android:appComponentFactory"" in Manifest.XML and android.useAndroidX=true, android.enableJetifier=true does not work 解决方法如:1。“工具:替换=”android:appComponentFactory“”在Manifest.XML和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.

The dependencies I used 我使用的依赖项

"dependencies": {
    "lottie-react-native": "^2.6.1",
    "native-base": "^2.12.1",
    "react": "16.8.6",
    "react-native": "0.59.9",
    "react-native-admob": "^2.0.0-beta.5",
    "react-native-cardview": "^2.0.2",
    "react-native-complete-flatlist": "^1.1.34",
    "react-native-fast-image": "^6.0.3",
    "react-native-headroom": "^1.0.1",
    "react-native-loading-spinner-overlay": "^1.0.1",
    "react-native-mail": "^3.0.7",
    "react-native-reanimated": "^1.0.1",
    "react-native-router-flux": "^4.0.6",
    "react-native-scrollable-tab-view": "^0.10.0",
    "react-native-share": "^1.2.1",
    "react-native-vector-icons": "^6.5.0",
    "react-native-webview": "^5.12.0"
  },

Kindly add any possible workarounds for this issue 请为此问题添加任何可能的解决方法

Have faced this issue for the past two days. 过去两天都遇到过这个问题。 Lots of other answers mention using react-native-device-info to update version. 许多其他答案提到使用react-native-device-info来更新版本。 But it doesn't work on my case. 但它对我的情况不起作用。

The main cause is due to google play services and firebase update Refer here which cause React native build failed. 主要原因是谷歌播放服务和firebase更新请参阅此处导致React本机构建失败的原因。

I had made the build successful at last and here I am sharing the gist link 我最终使构建成功,在这里我分享了主旨链接

Changed the following list of files as mentioned in the above gist link, 更改了以上gist链接中提到的以下文件列表,

android/build.gradle:
build.gradle:
gradle.properties:
package.json
gradle-wrapper.properties

And finally used this package 最后使用了这个包

npm i jetifier && npx jetify

Once done, at last run 完成后,最后一次运行

react-native run-android

And made the build successful 并使构建成功

Tips: use ./gradlew clean before trying the fix. 提示:在尝试修复之前使用./gradlew clean Hope it helps! 希望能帮助到你!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 React-native android 应用程序的任务“:app:processDebugManifest”执行失败 - React-native Execution failed for task ':app:processDebugManifest' for android app 如何修复 React Native 中任务“:app:processDebugManifest”的执行失败? - How to fix Execution failed for task ':app:processDebugManifest' in React Native? 任务&#39;:app:processDebugManifest的执行失败 - Execution failed for task ':app:processDebugManifest 任务&#39;:app:processDebugManifest&#39;的执行失败 - Execution failed for task':app:processDebugManifest' 添加 Admob 模块后反应原生“任务执行失败:&#39;:app:processDebugManifest&#39; - React native "Execution failed for task: ':app:processDebugManifest' after adding Admob module 反应本地admob任务:app:processDebugManifest运行时出现FAILED错误 - react native admob Task :app:processDebugManifest FAILED error on run 如何解决任务执行失败&#39;:app:processDebugManifest&#39; - How to solve Execution failed for task ':app:processDebugManifest' LocationAwareException:任务&#39;:app:processDebugManifest&#39;的执行失败 - LocationAwareException: Execution failed for task ':app:processDebugManifest' 错误:任务&#39;:app:processDebugManifest&#39;的执行失败 - Error:Execution failed for task ':app:processDebugManifest' 错误:任务&#39;:app:processDebugManifest&#39;的执行失败。 &gt; - Error:Execution failed for task ':app:processDebugManifest'. >
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM