davideas / FlexibleAdapter

Fast and versatile Adapter for RecyclerView which regroups several features into one library to considerably improve the user experience :-)
Apache License 2.0
3.55k stars 553 forks source link

duplicate value for resource 'attr/rippleColor' with config ''. #501

Closed meness closed 6 years ago

meness commented 6 years ago

Hi,

Please use different name for the attribute rippleColor to fix this problem.

davideas commented 6 years ago

@meness, I did not declare any attribute that uses this name. The UndoHelper uses the design library, it might come from there?

meness commented 6 years ago

When I import this library, I get that build error. Please update to the latest version of support lib, this may fix that.

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile project(':observer_scroll')
    compile project(':Fontify')
    compile project(':TimePicker')
    compile project(':DatePicker')
    compile project(':blossom')
    compile project(':flyrefresh')
    compile project(':update_downloader')
    compile project(':elliot')
    compile 'com.melnykov:floatingactionbutton:1.3.0'
    compile 'me.leolin:ShortcutBadger:1.1.13@aar'
    compile 'com.github.castorflex.smoothprogressbar:library:1.3.0'
    compile 'joda-time:joda-time:2.9.4'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
    compile 'com.android.support:appcompat-v7:27.0.2'
    compile 'com.google.android.gms:play-services-gcm:10.0.1'
    compile 'com.google.android.gms:play-services-analytics:10.0.1'
    compile 'com.squareup.okhttp:okhttp:2.7.5'
    compile 'com.ogaclejapan.smarttablayout:library:1.3.0@aar'
    compile 'com.ogaclejapan.smarttablayout:utils-v4:1.3.0@aar'
    compile 'com.daimajia.slider:library:1.1.5@aar'
    compile 'com.android.support:recyclerview-v7:27.0.2'
    compile 'com.android.support:cardview-v7:27.0.2'
    compile 'com.github.navasmdc:MaterialDesign:1.4@aar'
    compile 'com.r0adkll:slidableactivity:2.0.3'
    compile 'me.drakeet.materialdialog:library:1.2.2'
    compile 'com.larswerkman:HoloColorPicker:1.5@aar'
    compile 'com.github.bumptech.glide:glide:3.8.0'
    compile 'com.github.douglasjunior:android-simple-tooltip:0.2.1'
    compile 'com.pnikosis:materialish-progress:1.7'
    compile 'com.makeramen:roundedimageview:2.2.1'
    compile 'com.github.moondroid.coverflow:library:1.0'
    compile project(':payment-credit')
    compile('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
        transitive = true;
    }
    compile('com.crashlytics.sdk.android:answers:1.3.13@aar') {
        transitive = true;
    }
    compile('io.fabric.sdk.android:fabric:1.3.10@aar') {
        transitive = true;
    }
    compile('io.branch.sdk.android:library:2.11.1@aar') {
        transitive = true;
    }
    compile 'com.flurry.android:analytics:7.2.3@aar'
    compile project(':emoji')
    annotationProcessor "com.google.dagger:dagger-compiler:2.13"
    compile 'com.google.dagger:dagger:2.13'
    compile 'com.google.dagger:dagger-android:2.13'
    compile 'com.google.dagger:dagger-android-support:2.13'
    annotationProcessor "com.google.dagger:dagger-android-processor:2.13"
    compile 'com.jakewharton:butterknife:8.8.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    compile 'org.greenrobot:eventbus:3.1.1'
    compile 'com.android.support:multidex:1.0.2'
    //compile 'eu.davidea:flexible-adapter:5.0.0-rc3'
}
davideas commented 6 years ago

Thanks @meness, you will help me to find which library goes in conflicts because you have a nice dependency tree. I propose several tries, but first from Android Studio 3.0 use implementation:

  1. Try to use the new hidden buildTools 27.0.1.
  2. Use @aar to flexible-adapter and transitive=true.
  3. Exclude the design library from flexible-adapter and/or also app-compat.
  4. Comment and uncomment libraries until you find.
  5. RC3 uses support library 27.0.0, the current snapshot uses 27.0.1 (I also published today a new Snapshot with the 27.0.2) but please, first try the other points!

Maybe one of these points can resolve or all together, in general read this article I'm sure it will help in these cases, but please write here your solution(s) too: https://www.devsbedevin.com/android-understanding-gradle-dependencies-and-resolving-conflicts/

meness commented 6 years ago

@davideas Thanks man. I updated the build tools version to 27.0.1 it didn't worked. I tried @aar along with transitive=true it didn't worked either, but excluding the design library worked like a charm!

Note: I already tried updating the support lib version of FlexibleAdapter (by forking), it didn't worked either.

implementation('eu.davidea:flexible-adapter:5.0.0-rc3') {
        exclude module: 'design'
}
davideas commented 6 years ago

Very good @meness, I will try to remove the design library from the main package and move the UndoHelper to the UI package.

Please keep this issue open for others until I make the change.

ibuprofane commented 6 years ago

Just a note for future implementers - I had this same error but now the exclusion must be made from the UI package.

implementation('eu.davidea:flexible-adapter-ui:1.0.0-b4') {
    exclude module: 'design'
}