Pinview icon indicating copy to clipboard operation
Pinview copied to clipboard

Manifest merger failed with multiple errors, Fix needed ASAP

Open electrodragon opened this issue 3 years ago • 2 comments

if i include this library in project, i get the following error, please provide a fix.

Executing tasks: [:app:assembleDebug] in project /home/attaullah/AndroidStudioProjects/Racheron

> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:dataBindingMergeDependencyArtifactsDebug UP-TO-DATE
> Task :app:dataBindingMergeGenClassesDebug UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:mergeDebugResources UP-TO-DATE
> Task :app:dataBindingGenBaseClassesDebug UP-TO-DATE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:writeDebugApplicationId UP-TO-DATE
> Task :app:generateSafeArgsDebug UP-TO-DATE
> Task :app:checkDebugAarMetadata UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:extractDeepLinksDebug UP-TO-DATE

> Task :app:processDebugMainManifest FAILED
[com.android.support:animated-vector-drawable:28.0.0] /home/attaullah/.gradle/caches/transforms-2/files-2.1/9d3e6dc301483367fed7017e1df05a8c/animated-vector-drawable-28.0.0/AndroidManifest.xml Warning:
	Package name 'android.support.graphics.drawable' used in: com.android.support:animated-vector-drawable:28.0.0, com.android.support:support-vector-drawable:28.0.0.
[androidx.versionedparcelable:versionedparcelable:1.1.1] /home/attaullah/.gradle/caches/transforms-2/files-2.1/b2156729350c545798d54a40891d393c/versionedparcelable-1.1.1/AndroidManifest.xml Warning:
	Package name 'androidx.versionedparcelable' used in: androidx.versionedparcelable:versionedparcelable:1.1.1, com.android.support:versionedparcelable:28.0.0.
/home/attaullah/AndroidStudioProjects/Racheron/app/src/main/AndroidManifest.xml:24:18-86 Error:
	Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.5.0] AndroidManifest.xml:24:18-86
	is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory).
	Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:6:5-22: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 ':app:processDebugMainManifest'.
> Manifest merger failed with multiple errors, see logs

* 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

BUILD FAILED in 3s
12 actionable tasks: 1 executed, 11 up-to-date

electrodragon avatar Jun 09 '21 06:06 electrodragon

Getting the same issue

Executing tasks: [:app:assembleDebug] in project C:\Users\Similin\AndroidStudioProjects\Vyb

> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:dataBindingMergeDependencyArtifactsDebug UP-TO-DATE
> Task :app:dataBindingMergeGenClassesDebug UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:dataBindingTriggerDebug UP-TO-DATE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:writeDebugApplicationId UP-TO-DATE
> Task :app:generateSafeArgsDebug UP-TO-DATE
> Task :app:checkDebugAarMetadata UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:extractDeepLinksDebug UP-TO-DATE
> Task :app:mergeDebugResources

> Task :app:processDebugMainManifest FAILED
[com.android.support:animated-vector-drawable:28.0.0] C:\Users\Similin\.gradle\caches\transforms-2\files-2.1\3c9687a792f5a9082f6c5f23f7bbb6b6\animated-vector-drawable-28.0.0\AndroidManifest.xml Warning:
	Package name 'android.support.graphics.drawable' used in: com.android.support:animated-vector-drawable:28.0.0, com.android.support:support-vector-drawable:28.0.0.
[androidx.versionedparcelable:versionedparcelable:1.1.1] C:\Users\Similin\.gradle\caches\transforms-2\files-2.1\7fd989fa63e30eb92c27f8067e416d34\versionedparcelable-1.1.1\AndroidManifest.xml Warning:
	Package name 'androidx.versionedparcelable' used in: androidx.versionedparcelable:versionedparcelable:1.1.1, com.android.support:versionedparcelable:28.0.0.
C:\Users\Similin\AndroidStudioProjects\Vyb\app\src\main\AndroidManifest.xml:24:18-86 Error:
	Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.5.0] AndroidManifest.xml:24:18-86
	is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory).
	Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:6:5-29: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 ':app:processDebugMainManifest'.
> Manifest merger failed with multiple errors, see logs

* 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

BUILD FAILED in 1s
12 actionable tasks: 2 executed, 10 up-to-date

similincbose avatar Jun 20 '21 17:06 similincbose

Adding android.enableJetifier=true in gradle.properties sorted this issue for me

donmarsh avatar Jun 21 '21 14:06 donmarsh