question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Getting Started" instructions causing "Manifest merger" error

See original GitHub issue

Version

Add the version of the litho packages you use. You can paste the dependency section of the gradle file if you have one.

implementation 'com.facebook.litho:litho-core:0.25.0'
implementation 'com.facebook.litho:litho-widget:0.25.0'
annotationProcessor 'com.facebook.litho:litho-processor:0.25.0'
implementation 'com.facebook.soloader:soloader:0.5.1'
implementation 'com.facebook.litho:litho-fresco:0.25.0'
testImplementation 'com.facebook.litho:litho-testing:0.25.0'

Issues and Steps to Reproduce

Replace this with steps to repro your issue. The “Getting Started” guide isn’t working on my system: https://fblitho.com/docs/getting-started

  1. Open Android Studio 3.4 on Ubuntu 18.04.2 LTS.
  2. Create new project with “Empty Activity” and Java language. Leave minimum API level as 15.
  3. Click “Gradle Scripts” in left pane, and see two “build.gradle” files (“Getting Started” could specify more clearly which one to use).
  4. Click first “build.gradle”, and note that “jcenter()” is included under “repositories”.
  5. Click second “build.gradle”, and paste implementation lines from "Getting Started at the bottom of “dependencies” (a copy of the lines I pasted is under the “Version” header of this issue).
  6. Click “Build Output” in lower bar. See error:
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:5:5-19:19 to override.

Attempting to follow the error message’s advice results in a different trail of issues. There are two existing Stack Overflow issues about this: https://stackoverflow.com/questions/54323638/manifest-merger-failed-error-in-android-gradle https://stackoverflow.com/questions/28095703/manifest-merger-failed-error/31793227

Expected Behavior

Describe what you expected would happen.

No errors. Thanks! Hopefully, there is an official fix, or I’m just making a silly mistake.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
pavlosptcommented, May 15, 2019

A library that has already migrated to AndroidX can not be used in non-AndroidX projects!

0reactions
colriotcommented, May 20, 2019

Awesome! Closing this one then

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manifest Merger failed with multiple errors in Android Studio
Open application manifest ( AndroidManifest.xml ) and click on Merged Manifest tab on bottom of your edit pane. Check the image below:.
Read more >
manifest merger failed with multiple errors see logs - Edureka
Following which, Click on the merged manifest option. An Error would be visible at the right column and then one must try to...
Read more >
How to fix : ' Manifest merger failed with multiple errors, see ...
Today in this video i will show how to fix : ' Manifest merger failed with multiple errors, see logs ' appears when...
Read more >
Manage manifest files - Android Developers
This creates a manifest merge error. The two manifest elements cannot differ at all in strict mode. So you must apply other merge...
Read more >
Manifest Merger Fails with Multiple Errors in Android Studio
An Android Studio project generally contains more than one Android Manifest.xml file. They are provided by the main sources set, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found