I have following dependency and getting CoordinatorLayout$Behavior
duplicate entry. I have searched so more but did not find any solution.
I am getting
Run this to view app dependencies
gradlew -q :app:dependencies > dependencies.txt
It will output a big tree, where:
Output:
+--- com.android.support:design:26.1.0
| +--- com.android.support:support-v4:26.1.0 (*)
| +--- com.android.support:appcompat-v7:26.1.0 -> 27.1.1 (*)
| +--- com.android.support:recyclerview-v7:26.1.0 (*)
| \--- com.android.support:transition:26.1.0
| +--- com.android.support:support-annotations:26.1.0 -> 27.1.1
| \--- com.android.support:support-v4:26.1.0 (*)
In my case I found that com.android.support:design:26.1.0
was depending on com.android.support:appcompat-v7:26.1.0 -> 27.1.1 (*)
, which resolved to 27.1.1 instead of 26.1.0
Solution
Force version 26.1.0 by declaring in gradle compile ("com.android.support:appcompat-v7:26.1.0") { force = true }
References