Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manifest merger failed : Attribute application@appComponentFactory #654

Closed
Thien658jjh opened this issue Oct 17, 2018 · 4 comments
Closed

Comments

@Thien658jjh
Copy link

I got this Error when I tried to implement photoView.
I also tried that suggestion but it's not a solution, it not worked.

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:9:5-49:19 to override.
@Thien658jjh
Copy link
Author

I fixed it by using an other library ✌️

@Jawnnypoo
Copy link
Contributor

It has to do with AndroidX. Either you can downgrade the PhotoView dependency or upgrade to AndroidX

@androidovshchik
Copy link

Downgrade to
implementation 'com.github.chrisbanes:PhotoView:2.1.4'

@kongwenbin
Copy link

Downgrade to
implementation 'com.github.chrisbanes:PhotoView:2.1.4'

This is the instant solution to resolve this issue, however, if for any reason, you require the fixes and features implemented from 2.1.5 onwards (e.g. current latest version is 2.3.0), you can migrate your project to AndroidX.

Below are the steps to perform the migration using Android Studio. It is pretty handy as it will also prompt you to back up your existing code as a ZIP file prior to the migration.

With Android Studio 3.2 and higher, you can quickly migrate an existing project to use AndroidX by selecting Refactor > Migrate to AndroidX from the menu bar.

Read more about the migration to AndroidX here: https://developer.android.com/jetpack/androidx/migrate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants