luizgrp / SectionedRecyclerViewAdapter

An Adapter that allows a RecyclerView to be split into Sections with headers and/or footers. Each Section can have its state controlled individually.
MIT License
1.68k stars 372 forks source link

Gradle sync issue with version 2.1.0 #173

Closed Lebirdie closed 5 years ago

Lebirdie commented 5 years ago

Hi tried to include last version of your library in my gradle but I got the following Sync Issue:

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.1] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:5:5-27:19 to override.

The problem seems to come from an incompatibility between your library and appcompat-v7 v.28.0.0 which I use for my project. Here is the list of the libraries I use so far:

dependencies { implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:support-v4:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' implementation 'com.readystatesoftware.sqliteasset:sqliteassethelper:+' implementation 'org.javatuples:javatuples:1.2' implementation 'org.apache.commons:commons-lang3:3.9' implementation 'com.android.support:design:28.0.0' implementation 'com.android.support:recyclerview-v7:28.0.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' }

I don't see exactly what I should do to fix the problem. Could you please help me? Many thanks in advance.

Lebirdie commented 5 years ago

Found it myself: migrate to AndroidX (in Android Studio 3.4.2: Refactor > Migrate to AndroidX). I leave the answer here for beginners in Android like me who will probably face the same problem.

luizgrp commented 5 years ago

@Lebirdie thanks for getting back with the solution 👍

I will add back the warning in the readme regarding the AndroidX in order to let people know