florent37 / ExpansionPanel

Android - Expansion panels contain creation flows and allow lightweight editing of an element.
https://material.io/guidelines/components/expansion-panels.html
Apache License 2.0
1.98k stars 239 forks source link

Manifest error After add to project #51

Open amirtorabi opened 5 years ago

amirtorabi commented 5 years ago

when i add dependency and use expanision panel in my project i have got this error in manifest:

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 element at AndroidManifest.xml:6:5-27:19 to override.

kmelodi commented 5 years ago

I got a similar problem when using a new library, Problems are solved in two ways.

1- Using the

implementation of 'com.github.florent37: expansionpanel: 1.1.1'

  Instead of

implementing 'com.github.florent37: expansionpanel: 1.2.2'

2- I fixed the problem by migrating the project to androidx

The new android studio does the migration smoothly just click on Refactor-->migrate to androidx-->It will ask you to back up-->then do refactor.

Watch this tutorial, hope it helps. https://www.youtube.com/watch?v=0FZ_eUIsLTg