Manifest merger failed : Attribute [email protected] value=(android.support.v4.app.C

> Task :MobileBZT:processYingyongbaoDebugManifest FAILED
D:\Android_workspace\workspae_bzt\MobileBZT\AndroidManifest.xml:22:18-91 Error:
    Attribute [email protected] 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.1.0] AndroidManifest.xml:24:18-86 value=(androidx.core.app.CoreComponentFactory).
    Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:37:5-729:19 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 ':MobileBZT:processYingyongbaoDebugManifest'.
> Manifest merger failed : Attribute [email protected] 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.1.0] AndroidManifest.xml:24:18-86 value=(androidx.core.app.CoreComponentFactory).
      Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:37:5-729: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 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1s

 

Manifest merger failed : Attribute [email protected] value=(android.support.v4.app.C

 

解决方案:

application 中加入: 

android:appComponentFactory=""
 tools:replace="android:appComponentFactory"

如图:

Manifest merger failed : Attribute [email protected] value=(android.support.v4.app.C

欢迎各位小伙伴加入我的qq群:开发一群:454430053 开发二群:537532956   这里已经有很多小伙伴在等你了,快来加入我们吧