All com.android.support libraries must use the exact same version specification












680















After updating to android studio 2.3 I got this error message.
I know it's just a hint as the app run normally but it's really strange.




All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.1.1, 24.0.0. Examples include com.android.support:animated-vector-drawable:25.1.1 and com.android.support:mediarouter-v7:24.0.0




enter image description here



my gradle:



dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'

compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:support-v4:25.1.1'
compile 'com.android.support:design:25.1.1'
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.android.support:cardview-v7:25.1.1'
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.google.android.gms:play-services:10.2.0'

compile 'io.reactivex.rxjava2:rxjava:2.0.1'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
compile 'com.blankj:utilcode:1.3.6'
compile 'com.orhanobut:logger:1.15'
compile 'com.facebook.stetho:stetho:1.4.2'

provided 'com.google.auto.value:auto-value:1.2'
annotationProcessor 'com.google.auto.value:auto-value:1.2'
annotationProcessor 'com.ryanharter.auto.value:auto-value-parcel:0.2.5'

compile 'com.mikepenz:iconics-core:2.8.2@aar'
compile('com.mikepenz:materialdrawer:5.8.1@aar') { transitive = true }
compile 'com.mikepenz:google-material-typeface:2.2.0.3.original@aar'
compile 'me.zhanghai.android.materialprogressbar:library:1.3.0'
compile 'com.github.GrenderG:Toasty:1.1.1'
compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.8.0'
compile 'com.github.MAXDeliveryNG:slideview:1.0.0'

compile 'com.facebook.fresco:fresco:1.0.1'
compile 'com.github.bumptech.glide:glide:3.7.0'

compile 'com.google.maps.android:android-maps-utils:0.4.4'
compile 'com.github.jd-alexander:library:1.1.0'
}









share|improve this question

























  • add this to your projectBuild.Gradle subprojects { project.configurations.all { resolutionStrategy.eachDependency { details -> if (details.requested.group == 'com.android.support' && !details.requested.name.contains('multidex') ) { details.useVersion "26.+" } } } }

    – Sunil Chaudhary
    Aug 30 '18 at 7:13
















680















After updating to android studio 2.3 I got this error message.
I know it's just a hint as the app run normally but it's really strange.




All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.1.1, 24.0.0. Examples include com.android.support:animated-vector-drawable:25.1.1 and com.android.support:mediarouter-v7:24.0.0




enter image description here



my gradle:



dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'

compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:support-v4:25.1.1'
compile 'com.android.support:design:25.1.1'
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.android.support:cardview-v7:25.1.1'
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.google.android.gms:play-services:10.2.0'

compile 'io.reactivex.rxjava2:rxjava:2.0.1'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
compile 'com.blankj:utilcode:1.3.6'
compile 'com.orhanobut:logger:1.15'
compile 'com.facebook.stetho:stetho:1.4.2'

provided 'com.google.auto.value:auto-value:1.2'
annotationProcessor 'com.google.auto.value:auto-value:1.2'
annotationProcessor 'com.ryanharter.auto.value:auto-value-parcel:0.2.5'

compile 'com.mikepenz:iconics-core:2.8.2@aar'
compile('com.mikepenz:materialdrawer:5.8.1@aar') { transitive = true }
compile 'com.mikepenz:google-material-typeface:2.2.0.3.original@aar'
compile 'me.zhanghai.android.materialprogressbar:library:1.3.0'
compile 'com.github.GrenderG:Toasty:1.1.1'
compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.8.0'
compile 'com.github.MAXDeliveryNG:slideview:1.0.0'

compile 'com.facebook.fresco:fresco:1.0.1'
compile 'com.github.bumptech.glide:glide:3.7.0'

compile 'com.google.maps.android:android-maps-utils:0.4.4'
compile 'com.github.jd-alexander:library:1.1.0'
}









share|improve this question

























  • add this to your projectBuild.Gradle subprojects { project.configurations.all { resolutionStrategy.eachDependency { details -> if (details.requested.group == 'com.android.support' && !details.requested.name.contains('multidex') ) { details.useVersion "26.+" } } } }

    – Sunil Chaudhary
    Aug 30 '18 at 7:13














680












680








680


205






After updating to android studio 2.3 I got this error message.
I know it's just a hint as the app run normally but it's really strange.




All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.1.1, 24.0.0. Examples include com.android.support:animated-vector-drawable:25.1.1 and com.android.support:mediarouter-v7:24.0.0




enter image description here



my gradle:



dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'

compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:support-v4:25.1.1'
compile 'com.android.support:design:25.1.1'
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.android.support:cardview-v7:25.1.1'
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.google.android.gms:play-services:10.2.0'

compile 'io.reactivex.rxjava2:rxjava:2.0.1'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
compile 'com.blankj:utilcode:1.3.6'
compile 'com.orhanobut:logger:1.15'
compile 'com.facebook.stetho:stetho:1.4.2'

provided 'com.google.auto.value:auto-value:1.2'
annotationProcessor 'com.google.auto.value:auto-value:1.2'
annotationProcessor 'com.ryanharter.auto.value:auto-value-parcel:0.2.5'

compile 'com.mikepenz:iconics-core:2.8.2@aar'
compile('com.mikepenz:materialdrawer:5.8.1@aar') { transitive = true }
compile 'com.mikepenz:google-material-typeface:2.2.0.3.original@aar'
compile 'me.zhanghai.android.materialprogressbar:library:1.3.0'
compile 'com.github.GrenderG:Toasty:1.1.1'
compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.8.0'
compile 'com.github.MAXDeliveryNG:slideview:1.0.0'

compile 'com.facebook.fresco:fresco:1.0.1'
compile 'com.github.bumptech.glide:glide:3.7.0'

compile 'com.google.maps.android:android-maps-utils:0.4.4'
compile 'com.github.jd-alexander:library:1.1.0'
}









share|improve this question
















After updating to android studio 2.3 I got this error message.
I know it's just a hint as the app run normally but it's really strange.




All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.1.1, 24.0.0. Examples include com.android.support:animated-vector-drawable:25.1.1 and com.android.support:mediarouter-v7:24.0.0




enter image description here



my gradle:



dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'

compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:support-v4:25.1.1'
compile 'com.android.support:design:25.1.1'
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.android.support:cardview-v7:25.1.1'
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.google.android.gms:play-services:10.2.0'

compile 'io.reactivex.rxjava2:rxjava:2.0.1'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
compile 'com.blankj:utilcode:1.3.6'
compile 'com.orhanobut:logger:1.15'
compile 'com.facebook.stetho:stetho:1.4.2'

provided 'com.google.auto.value:auto-value:1.2'
annotationProcessor 'com.google.auto.value:auto-value:1.2'
annotationProcessor 'com.ryanharter.auto.value:auto-value-parcel:0.2.5'

compile 'com.mikepenz:iconics-core:2.8.2@aar'
compile('com.mikepenz:materialdrawer:5.8.1@aar') { transitive = true }
compile 'com.mikepenz:google-material-typeface:2.2.0.3.original@aar'
compile 'me.zhanghai.android.materialprogressbar:library:1.3.0'
compile 'com.github.GrenderG:Toasty:1.1.1'
compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.8.0'
compile 'com.github.MAXDeliveryNG:slideview:1.0.0'

compile 'com.facebook.fresco:fresco:1.0.1'
compile 'com.github.bumptech.glide:glide:3.7.0'

compile 'com.google.maps.android:android-maps-utils:0.4.4'
compile 'com.github.jd-alexander:library:1.1.0'
}






android android-studio build.gradle android-studio-3.0 android-studio-2.3






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 9 '17 at 7:10







humazed

















asked Feb 21 '17 at 17:35









humazedhumazed

35.4k196189




35.4k196189













  • add this to your projectBuild.Gradle subprojects { project.configurations.all { resolutionStrategy.eachDependency { details -> if (details.requested.group == 'com.android.support' && !details.requested.name.contains('multidex') ) { details.useVersion "26.+" } } } }

    – Sunil Chaudhary
    Aug 30 '18 at 7:13



















  • add this to your projectBuild.Gradle subprojects { project.configurations.all { resolutionStrategy.eachDependency { details -> if (details.requested.group == 'com.android.support' && !details.requested.name.contains('multidex') ) { details.useVersion "26.+" } } } }

    – Sunil Chaudhary
    Aug 30 '18 at 7:13

















add this to your projectBuild.Gradle subprojects { project.configurations.all { resolutionStrategy.eachDependency { details -> if (details.requested.group == 'com.android.support' && !details.requested.name.contains('multidex') ) { details.useVersion "26.+" } } } }

– Sunil Chaudhary
Aug 30 '18 at 7:13





add this to your projectBuild.Gradle subprojects { project.configurations.all { resolutionStrategy.eachDependency { details -> if (details.requested.group == 'com.android.support' && !details.requested.name.contains('multidex') ) { details.useVersion "26.+" } } } }

– Sunil Chaudhary
Aug 30 '18 at 7:13












50 Answers
50






active

oldest

votes













1 2
next












787














You can solve this with one of the following solutions:



Update:



As of Android studio 3.0, it becomes much easier as it now shows a more helpful hint, so we only need to follow this hint.

for example:
1]




All com.android.support libraries must use the exact same version
specification (mixing versions can lead to runtime crashes). Found
versions 27.0.2, 26.1.0. Examples include
com.android.support:animated-vector-drawable:27.0.2 and
com.android.support:customtabs:26.1.0



there are some combinations of libraries, or tools and libraries, that
are incompatible, or can lead to bugs. One such incompatibility is
compiling with a version of the Android support libraries that is not
the latest version (or in particular, a version lower than your
targetSdkVersion.)




Solution:

Add explicitly the library with the old version but with a new version number.

in my case com.android.support:customtabs:26.1.0 so I need to add:



implementation "com.android.support:customtabs:27.0.2"  


ie: Take the library from the second item, and implement it with the version number from the first.



Note: don't forget to press sync now so gradle can rebuild the dependency graph and see if there are any more conflicts.



Explanation:

you may be confused by the error message as don't use customtabs so how I have a conflict!!

well.. you didn't use it directly but one of your libraries uses an old version of customtabs internally, so you need to ask for it directly.



if you curious to know which of your libraries is responsible for the old version and maybe ask the author to update his lib, Run a Gradle dependency report, see the old answer to know how.



Note this





Old answer:



inspired by CommonsWare answer:



Run a Gradle dependency report to see what your full tree of
dependencies is.



From there, you will see which one of your libraries are asking for a different version of the Android Support libraries.
For whatever it is asking for, you can ask for it directly with the
25.2.0 version or use Gradle's other conflict resolution approaches to get the same versions.





Update:



As of gradle plugin version: 3.0 compile has been replaced by implementation or api see this answer for the difference.



hence use instead:



./gradlew -q dependencies app:dependencies --configuration debugAndroidTestCompileClasspath


or for windows cmd:



gradlew -q dependencies app:dependencies --configuration debugAndroidTestCompileClasspath


and search for the conflicted version.



For me, the error disappeared after removing com.google.android.gms:play-services:10.2.0



And only include com.google.android.gms:play-services-location:10.2.0 and com.google.android.gms:play-services-maps:10.2.0 as they are the only two play services that I use.



I think the gms:play-services depend on some old components of the support library, so we need to add them explicitly ourselves.





for AS 3.0 an older.



Run:



./gradlew -q dependencies <module-name>:dependencies --configuration implementation


Example:



./gradlew -q dependencies app:dependencies --configuration implementation




if someone knows a better way in the new gradle plugin please let me know.






share|improve this answer





















  • 3





    com.google.android.gms:play-services:10.2.0 supports SDK 14 and above, if you want to use below SDK 14, you need to use version 10.0.1 as mentioned in stackoverflow.com/a/42315590/6248491

    – Sneh Pandya
    Feb 21 '17 at 17:53






  • 1





    my min SDK is 16 it's not the same error.

    – humazed
    Feb 21 '17 at 17:58






  • 2





    @humazed noob question, where do I run the command in Android Studio?

    – Haikal Nashuha
    Mar 20 '17 at 4:12






  • 1





    in the terminal, but first, try to try the play-services thing

    – humazed
    Mar 20 '17 at 4:12








  • 3





    It may be helpful to point out that the examples include text in the error message shows actual examples from your own project, not vague general examples of the type of problem. Take the library from the second item, and implement it with the version number from the first.

    – Benjamin Kershner
    Apr 18 '18 at 14:03



















195















  1. Go to project/.idea/libraries folder on your file system and see which libraries are different.

  2. You will have to manually include these libraries with the same version in your build.gradle file.

  3. Then, sync your project.


E.g.:



compile 'com.android.support:appcompat-v7:25.2.0'

// Wrong library version found on 1st point
compile 'com.android.support:customtabs:25.2.0'





share|improve this answer


























  • Good point. I never thought about taking a look which one actually was the wrong one. :S Thanks!

    – Tobias Reich
    Mar 6 '17 at 14:26











  • works when gradle automatic resolving method doesn't, thanks

    – Odaym
    Mar 6 '17 at 20:03






  • 9





    in /Project Files/My project/.idea/libraries there are multiple support files with different version. Now how would I know which module or dependency is using this?

    – Satpal Yadav
    Mar 30 '17 at 11:27








  • 2





    @SatpalYadav I've searched for the version not matching the newest one available (I use in my app). E.g. I use support:design:25.3.1 but material-dialogs uses support-v13:25.1.1. So I've added support-v13:25.3.1 and the error disappears.

    – hardysim
    May 9 '17 at 7:25






  • 1





    Thats the best solution for me so far but how can I override newer libs?

    – Mateusz Kaflowski
    Mar 23 '18 at 14:42



















141














For all cases, not just for these versions or libraries:



Pay attention to the little information window that say something about the error, it says the examples that you have to change and add.



In this case:




Found versions 25.1.1, 24.0.0. Examples include com.android.support:animated-vector-drawable:25.1.1 and
com.android.support:mediarouter-v7:24.0.0




Your




com.android.support:animated-vector-drawable:25.1.1




is version 25.1.1, and your




com.android.support:mediarouter-v7:24.0.0




is version 24.0.0, so you have to add the mediarouter with the same version:



com.android.support:mediarouter-v7:25.1.1


And do that for every example that the little information window says, in this case all the libraries that doesn't have the version 25.1.1.



You have to sync the gradle after you fix the indicated library to see the next library and package that you have to change.



IMPORTANT:



If you are not explicitly using one or more specified libraries and it is giving you the error, it means that is being used internally by another library, compile it explicitly anyway.



You also can use another method to see the difference of the versions of all the libraries that you are actually compiling (like run a gradle dependency report or go to your libraries files), the real objetive is compile all the libraries that you are using with the same version.






share|improve this answer





















  • 1





    thanks a ton, can you please explain what support:mediarouter exactly does ?

    – mrid
    Dec 9 '17 at 7:34






  • 1





    I think this is something you have pointed out that most of us have over looked. And ie- "Pay attention to the little information window that say something about the error....". Thank you, this is now given me a better understanding of what is really happening.

    – Yo Apps
    Dec 18 '18 at 14:42





















88














Add this to the very end of your build.gradle (Module:app):



configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.3.1'
}
}

}
}


Make sure that you replace '25.3.1' with the version of the android support library that you want to use for all the dependencies , it should not be lower than your complile sdk version



than re sync gradle






share|improve this answer



















  • 3





    This is what I needed, one of my dependencies was pulling in 27.0.1 somehow, even when I specified a lesser version at the top level. Out of curiosity, why do you exclude the "multidex"?

    – ray
    Nov 20 '17 at 18:43











  • @ray Glad it helped, as per the documentation : developer.android.com/topic/libraries/support-library/… the multidex is the only support library of the "com.android.support" group that use a different version identifier, on the link a provided it is version 1.0.0 , the most recent being 1.0.1 as you can see here : developer.android.com/studio/build/multidex.html#mdex-gradle

    – ezzou
    Nov 22 '17 at 22:27








  • 2





    This has saved the day for me. But this android development is becoming even more fragmented every passing thay. People need to really check every support library perfectly before rolling it out. We don't always have the luxery of time to go through each new support release because we want to focus on building our products rather than going through all this. It's frustrating always

    – larrytech
    Dec 19 '17 at 21:59











  • thank you so much for your solution, this relates to Groovy techniques and syntax, but in Android studio - gradle file, we can't show any suggestion (use Ctrl + Space) when write something like this. Do you know any plugin/tool to show suggestion when write Groovy code in gradle file, instead of copy/paste some code that we don't remember or understand.

    – Think Twice Code Once
    Jul 1 '18 at 4:15






  • 1





    @ThinkTwiceCodeOnce You can go here to learn more about groovy, and its inteliji plugins : jetbrains.com/help/idea/getting-started-with-groovy.html

    – ezzou
    Jul 5 '18 at 3:59



















73














The best way to solve the problem is implement all 'com.android.support:...' suggested by android studio



(doesn't matter which support versions you are using -- 27.1.1, 28.0.0 etc..)



place the cursor to the error line eg:




implementation 'com.android.support:appcompat-v7:28.0.0'



android studio will suggest you which 'com.android.support:...' is different version than
'com.android.support:appcompat-v7:28.0.0'



example




All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 27.1.0, 27.0.2. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:exifinterface:27.1.0




so add com.android.support:animated-vector-drawable:28.0.0
& com.android.support:exifinterface:28.0.0.
now synch gradle file.



one by one try to implement all the suggested 'com.android.support:...' till there is no error in this line implementation 'com.android.support:appcompat-v7:28.0.0'



In my case, i added



implementation 'com.android.support:appcompat-v7:28.0.0'

implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:exifinterface:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'


all this dependencies... it could be different for others.






share|improve this answer

































    53














    I had the exact same problem after updating to Android Studio 2.3



    Adding this line to dependencies solved my problem:



    compile 'com.android.support:customtabs:25.2.0'





    share|improve this answer



















    • 2





      I had the exact same problem after updating to Android Studio 2.3

      – Plugie
      Mar 4 '17 at 11:11






    • 1





      For anyone using RenderScript, I set renderscriptSupportModeEnabled false this to false. And added compile 'com.android.support:customtabs:25.2.0' and error went away.

      – Law Gimenez
      Mar 6 '17 at 9:15








    • 1





      @LawGimenez And how should we use renderscript if we just disabled it?

      – dor506
      Mar 7 '17 at 12:40








    • 3





      looks like my problem is because of renderscript too, but what if i need renderscript for something else, not for customtabs?

      – HendraWD
      Mar 13 '17 at 8:38



















    44














    A) Run gradle dependencies or ./gradlew dependencies



    B) Look at your tree and figure out which of your dependencies is specifying a different support library version for a dependency you don't control.



    I didn't realize that this warning also displays if the dependency is completely unused directly by your own code. In my case, Facebook specifies some support libs I wasn't using, you can see below most of those dependencies were overridden by my own specification of 25.2.0, denoted by the -> X.X.X (*) symbols. The card view and custom tabs libs weren't overridden by anyone, so I need to ask for 25.2.0 for those ones myself even though I don't use them.



    +--- com.facebook.android:facebook-android-sdk:4.17.0
    | +--- com.android.support:support-v4:25.0.0 -> 25.2.0 (*)
    | +--- com.android.support:appcompat-v7:25.0.0 -> 25.2.0 (*)
    | +--- com.android.support:cardview-v7:25.0.0
    | | --- com.android.support:support-annotations:25.0.0 -> 25.2.0
    | +--- com.android.support:customtabs:25.0.0
    | | +--- com.android.support:support-compat:25.0.0 -> 25.2.0 (*)
    | | --- com.android.support:support-annotations:25.0.0 -> 25.2.0
    | --- com.parse.bolts:bolts-android:1.4.0 (*)


    If gradle has already warned you and given you examples...




    Examples include com.android.support:animated-vector-drawable:25.1.1
    and com.android.support:mediarouter-v7:24.0.0




    ... it's even easier if you throw in some grep highlighting for the lower version since gradle dependencies can be quite verbose:



    ./gradlew dependencies | grep --color -E 'com.android.support:mediarouter-v7|$'





    share|improve this answer





















    • 1





      From your explanation I understand that X.X.X -> Y.Y.Y (*) means that X.X.X is overridden by Y.Y.Y, that is good to know

      – Mercury
      Apr 30 '17 at 22:11











    • Literally the only valid answer.

      – stef
      Feb 23 '18 at 17:28



















    31














    Use variables: Doing something like the following will make it easier for you to ensure that you use the same version with all libraries



    dependencies {

    ext {
    support_library_version = '25.2.0'
    google_play_services_version = '10.2.0'
    }

    //#####################################################################
    // Support Library
    //#####################################################################
    compile "com.android.support:appcompat-v7:${support_library_version}"
    compile "com.android.support:palette-v7:${support_library_version}"
    compile "com.android.support:design:${support_library_version}"

    //#####################################################################
    // Google Play Services
    //#####################################################################
    compile "com.google.android.gms:play-services-auth:${google_play_services_version}"
    compile "com.google.android.gms:play-services-ads:${google_play_services_version}"
    compile "com.google.android.gms:play-services-analytics:${google_play_services_version}"

    //#####################################################################
    // Firebase
    //#####################################################################
    compile "com.google.firebase:firebase-core:${google_play_services_version}"
    compile "com.google.firebase:firebase-auth:${google_play_services_version}"
    compile "com.google.firebase:firebase-messaging:${google_play_services_version}"


    More information on how Google suggests that you handle this versioning can be found in this article: https://developer.android.com/studio/build/index.html#top-level






    share|improve this answer


























    • thanks Dear Daniel F, I think this is the best way to avoid the version mixing problem.

      – Hovanes Mosoyan
      Apr 14 '18 at 10:33






    • 2





      Only one note please: As suggested in the link above, we should define this type variables in the TOP LEVEL GRADLE FILE thanks again)

      – Hovanes Mosoyan
      Apr 14 '18 at 10:49





















    25














    I just add this :



    compile 'com.android.support:mediarouter-v7:25.2.0'


    Updated for new SDK versions



    compile 'com.android.support:mediarouter-v7:28.0.0-alpha3'





    share|improve this answer


























    • It doesn't solve a problem that old library contains old SDK.

      – CoolMind
      Sep 27 '18 at 13:54



















    19














    If the same error is on appcompat



    implementation 'com.android.support:appcompat-v7:27.0.1'


    then adding design solved it.



    implementation 'com.android.support:appcompat-v7:27.0.1'
    implementation 'com.android.support:design:27.0.1'


    For me, adding



    implementation 'de.mrmaffen:vlc-android-sdk:2.0.6'


    was including appcompat-v7:23.1.1 in




    .idea/libraries




    without vlc, appcompat alone is enough.






    share|improve this answer


























    • Many thanks, it worked, but what is the role of 'com.android.support:design:27.0.1'

      – Wessam El Mahdy
      May 25 '18 at 8:02



















    17














    As you already seen the all answers and comments above but this answer is to clear something which a new developer might not get easily.



    ./gradlew -q dependencies app:dependencies --configuration compile



    The above line will save your life with no doubt but how to get the exact point from the result of above line.



    When you get the all dependency chart or list from the above command then you have to search the conflicting version number which you are getting in your code. please see the below image.



    enter image description here



    in the above image you can see that 23.4.0 is creating the problem but this we not able to find in our gradle file. So now this version number(23.4.0) will save us. When we have this number then we will find this number in the result of above command result and directly import that dependency directly in our gradle file. Please see the below image to get the clear view.





    you can clearly see that com.android.support:cardview-v7:23.4.0 and com.android.support:customtabs:23.4.0 are using the version which is creating the problem. Now just simply copy those line from dependency
    list and explicitly use in our gradle file but with the updated version link



    implementation "com.android.support:cardview-v7:26.1.0"
    implementation "com.android.support:customtabs:26.1.0"






    share|improve this answer



















    • 1





      Thank you! With newer versions of android studio, it should be switched to implementation instead of compile

      – Avi Parshan
      Apr 2 '18 at 9:09











    • Yes you are right @AviParshan we can use compile or api. Dependencies appearing in the api configurations will be transitively exposed to consumers of the library, and as such will appear on the compile classpath of consumers. Dependencies found in the implementation configuration will, on the other hand, not be exposed to consumers, and therefore not leak into the consumers' compile classpath.

      – anoopbryan2
      Apr 2 '18 at 11:27













    • use ./gradlew -q dependencies app:dependencies --configuration implementation

      – Sumit
      Feb 15 at 7:45



















    13














    Another way to solve conflicts is just to force the correct version for all dependencies like this:



    dependencies {
    configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
    if (details.requested.group == 'com.android.support' && details.requested.name == 'support-v4') {
    details.useVersion "27.0.2"
    }
    }
    ...
    }


    https://docs.gradle.org/current/userguide/customizing_dependency_resolution_behavior.html






    share|improve this answer































      12














      Use support-v13 instead of support-v4



      compile 'com.android.support:support-v13:25.2.0'





      share|improve this answer
























      • I am getting problem with this:compile 'com.android.support:recyclerview-v7:25.2.0'

        – Crime_Master_GoGo
        Mar 14 '17 at 13:14













      • @Googli please write error text.

        – Mehmet Hanoğlu
        Mar 14 '17 at 13:21











      • Exact same error as above:-> all com.android.support libraries must use the exact same version specification Recyclerview

        – Crime_Master_GoGo
        Mar 14 '17 at 13:36













      • @Googli, Please write compileSdkVersion, buildToolsVersion and dependencies I used this. No problem compile 'com.android.support:appcompat-v7:25.2.0' compile 'com.android.support:design:25.2.0' compile 'com.android.support:support-v13:25.2.0' compile 'com.android.support:recyclerview-v7:25.2.0'

        – Mehmet Hanoğlu
        Mar 14 '17 at 13:59





















      9














      My problem is similar to yours.
      Here exist an error!



      compile 'com.android.support:appcompat-v7:25.3.0'



      All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.3.0, 24.0.0. Examples include 'com.android.support:animated-vector-drawable:25.3.0' and 'com.android.support:mediarouter-v7:24.0.0'



      Seeing this
      Examples include 'com.android.support:animated-vector-drawable:25.3.0' and 'com.android.support:mediarouter-v7:24.0.0'



      the just add these codes in dependencies, make sure that versions are same.



      compile 'com.android.support:animated-vector-drawable:25.3.0'
      compile 'com.android.support:mediarouter-v7:25.3.0'





      share|improve this answer































        9














        I got the same error after adding compile 'com.google.android.gms:play-services:10.2.4' with compile 'com.android.support:appcompat-v7:25.3.1'.



        Adding animated-vector-drawable and mediarouter libs fixed the issue.



        compile 'com.google.android.gms:play-services:10.2.4'
        compile 'com.android.support:appcompat-v7:25.3.1'
        compile 'com.android.support:animated-vector-drawable:25.3.1'
        compile 'com.android.support:mediarouter-v7:25.3.1'





        share|improve this answer































          9














          I had this:



          dependencies {
          implementation fileTree(dir: 'libs', include: ['*.jar'])
          implementation 'com.android.support:appcompat-v7:27.1.1'
          implementation 'com.android.support:design:27.1.1'
          implementation 'com.android.support:support-v4:27.1.1'
          implementation 'com.google.firebase:firebase-auth:12.0.1'
          implementation 'com.google.firebase:firebase-firestore:12.0.1'
          implementation 'com.google.firebase:firebase-messaging:12.0.1'
          implementation 'com.google.android.gms:play-services-auth:12.0.1'
          implementation'com.facebook.android:facebook-login:[4,5)'
          implementation 'com.twitter.sdk.android:twitter:3.1.1'
          implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
          implementation 'org.jetbrains:annotations-java5:15.0'
          implementation project(':vehiclesapi')
          testImplementation 'junit:junit:4.12'
          androidTestImplementation 'com.android.support.test:runner:1.0.1'
          androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
          }


          and got this error:
          enter image description here



          The solutions was easy - the primary dependencies were all correct so the leaves however - any third party dependencies. Removed one by one until found the culprit, and turns out to be facebook! its using version 27.0.2 of the android support libraries. I tried to add the cardview version 27.1.1 but that didn't work eithern the solution was still simple enough.



          dependencies {
          implementation fileTree(dir: 'libs', include: ['*.jar'])
          implementation 'com.android.support:appcompat-v7:27.1.1'
          implementation 'com.android.support:design:27.1.1'
          implementation 'com.android.support:support-v4:27.1.1'
          implementation 'com.google.firebase:firebase-auth:12.0.1'
          implementation 'com.google.firebase:firebase-firestore:12.0.1'
          implementation 'com.google.firebase:firebase-messaging:12.0.1'
          implementation 'com.google.android.gms:play-services-auth:12.0.1'
          implementation('com.facebook.android:facebook-login:[4,5)'){
          // contains com.android.support:v7:27.0.2, included required com.android.support.*:27.1.1 modules
          exclude group: 'com.android.support'
          }
          implementation 'com.android.support:cardview-v7:27.1.1' // to replace facebook sdk's cardview-v7:27.0.2.
          implementation 'com.twitter.sdk.android:twitter:3.1.1'
          implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
          implementation 'org.jetbrains:annotations-java5:15.0'
          implementation project(':vehiclesapi')
          testImplementation 'junit:junit:4.12'
          androidTestImplementation 'com.android.support.test:runner:1.0.1'
          androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
          }





          share|improve this answer































            8














            I used these two to solve my problem after upgrading to android studio 2.3



            compile 'com.android.support:animated-vector-drawable:25.0.0'
            compile 'com.android.support:mediarouter-v7:25.0.0'





            share|improve this answer































              8














              I had the same problem before and I got the solution for it.



              I just added the libraries that had the another version but with the same version of my support:appcompat.



              For your error for example :




              All com.android.support libraries must use the exact same version
              specification (mixing versions can lead to runtime crashes). Found
              versions 25.1.1, 24.0.0. Examples include
              com.android.support:animated-vector-drawable:25.1.1 and
              com.android.support:mediarouter-v7:24.0.0




              *The solution is to compile the versions of these libraries like that :



              compile 'com.android.support:mediarouter-v7:25.1.1'



              -if another library had the same issue and had another version just compile it with your support:appcompat version



              This resolved my problem and I hope it resolves yours.



              Best wishes :)






              share|improve this answer

































                6














                You have defined any other dependency to compile with version 24.0.0 instead of 25.1.1. Please set all dependencies version the same as 25.1.1.






                share|improve this answer
























                • I have updated my answer all the support versions has the same version 25.1.1

                  – humazed
                  Feb 21 '17 at 17:43



















                6














                I ran ./gradlew tasks --all and checked for dependencies that were a different version from the targeted version (25.3.1). You'll get something like this:



                app:prepareComAndroidSupportAnimatedVectorDrawable2531Library - Prepare com.android.support:animated-vector-drawable:25.3.1
                app:prepareComAndroidSupportAppcompatV72531Library - Prepare com.android.support:appcompat-v7:25.3.1
                app:prepareComAndroidSupportCardviewV72531Library - Prepare com.android.support:cardview-v7:25.3.1
                app:prepareComAndroidSupportCustomtabs2531Library - Prepare com.android.support:customtabs:25.3.1
                app:prepareComAndroidSupportDesign2531Library - Prepare com.android.support:design:25.3.1
                app:prepareComAndroidSupportMediarouterV72531Library - Prepare com.android.support:mediarouter-v7:25.3.1
                app:prepareComAndroidSupportPaletteV72531Library - Prepare com.android.support:palette-v7:25.3.1
                app:prepareComAndroidSupportRecyclerviewV72531Library - Prepare com.android.support:recyclerview-v7:25.3.1
                app:prepareComAndroidSupportSupportCompat2531Library - Prepare com.android.support:support-compat:25.3.1
                app:prepareComAndroidSupportSupportCoreUi2531Library - Prepare com.android.support:support-core-ui:25.3.1
                app:prepareComAndroidSupportSupportCoreUtils2531Library - Prepare com.android.support:support-core-utils:25.3.1
                app:prepareComAndroidSupportSupportFragment2531Library - Prepare com.android.support:support-fragment:25.3.1
                app:prepareComAndroidSupportSupportMediaCompat2531Library - Prepare com.android.support:support-media-compat:25.3.1
                app:prepareComAndroidSupportSupportV42531Library - Prepare com.android.support:support-v4:25.3.1
                app:prepareComAndroidSupportSupportVectorDrawable2531Library - Prepare com.android.support:support-vector-drawable:25.3.1
                app:prepareComAndroidSupportTransition2531Library - Prepare com.android.support:transition:25.3.1
                app:prepareComAndroidVolleyVolley100Library - Prepare com.android.volley:volley:1.0.0
                app:prepareComCrashlyticsSdkAndroidAnswers1312Library - Prepare com.crashlytics.sdk.android:answers:1.3.12
                app:prepareComCrashlyticsSdkAndroidBeta124Library - Prepare com.crashlytics.sdk.android:beta:1.2.4
                app:prepareComCrashlyticsSdkAndroidCrashlytics267Library - Prepare com.crashlytics.sdk.android:crashlytics:2.6.7
                app:prepareComCrashlyticsSdkAndroidCrashlyticsCore2316Library - Prepare com.crashlytics.sdk.android:crashlytics-core:2.3.16
                app:prepareComFacebookAndroidFacebookAndroidSdk4161Library - Prepare com.facebook.android:facebook-android-sdk:4.16.1
                app:prepareComGoogleAndroidGmsPlayServicesAnalytics1026Library - Prepare com.google.android.gms:play-services-analytics:10.2.6
                app:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl1026Library - Prepare com.google.android.gms:play-services-analytics-impl:10.2.6
                app:prepareComGoogleAndroidGmsPlayServicesAuth1026Library - Prepare com.google.android.gms:play-services-auth:10.2.6
                app:prepareComGoogleAndroidGmsPlayServicesAuthBase1026Library - Prepare com.google.android.gms:play-services-auth-base:10.2.6
                app:prepareComGoogleAndroidGmsPlayServicesBase1026Library - Prepare com.google.android.gms:play-services-base:10.2.6
                app:prepareComGoogleAndroidGmsPlayServicesBasement1026Library - Prepare com.google.android.gms:play-services-basement:10.2.6
                app:prepareComGoogleAndroidGmsPlayServicesCast1026Library - Prepare com.google.android.gms:play-services-cast:10.2.6
                app:prepareComGoogleAndroidGmsPlayServicesLocation1026Library - Prepare com.google.android.gms:play-services-location:10.2.6
                app:prepareComGoogleAndroidGmsPlayServicesMaps1026Library - Prepare com.google.android.gms:play-services-maps:10.2.6
                app:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4Impl1026Library - Prepare com.google.android.gms:play-services-tagmanager-v4-impl:10.2.6
                app:prepareComGoogleAndroidGmsPlayServicesTasks1026Library - Prepare com.google.android.gms:play-services-tasks:10.2.6
                app:prepareComGoogleFirebaseFirebaseAnalytics1026Library - Prepare com.google.firebase:firebase-analytics:10.2.6
                app:prepareComGoogleFirebaseFirebaseAnalyticsImpl1026Library - Prepare com.google.firebase:firebase-analytics-impl:10.2.6
                app:prepareComGoogleFirebaseFirebaseAppindexing1024Library - Prepare com.google.firebase:firebase-appindexing:10.2.4
                app:prepareComGoogleFirebaseFirebaseCommon1026Library - Prepare com.google.firebase:firebase-common:10.2.6
                app:prepareComGoogleFirebaseFirebaseCore1026Library - Prepare com.google.firebase:firebase-core:10.2.6
                app:prepareComGoogleFirebaseFirebaseIid1026Library - Prepare com.google.firebase:firebase-iid:10.2.6
                app:prepareComGoogleFirebaseFirebaseMessaging1026Library - Prepare com.google.firebase:firebase-messaging:10.2.6
                app:prepareComMindorksPlaceholderview027Library - Prepare com.mindorks:placeholderview:0.2.7
                app:prepareDebugAndroidTestDependencies
                app:prepareDebugDependencies
                app:prepareDebugUnitTestDependencies
                app:prepareInfoHoang8fAndroidSegmented105Library - Prepare info.hoang8f:android-segmented:1.0.5
                app:prepareIoFabricSdkAndroidFabric1316Library - Prepare io.fabric.sdk.android:fabric:1.3.16
                app:prepareNoNordicsemiAndroidLog211Library - Prepare no.nordicsemi.android:log:2.1.1
                app:prepareNoNordicsemiAndroidSupportV18Scanner100Library - Prepare no.nordicsemi.android.support.v18:scanner:1.0.0


                In this case, I was targeting 25.3.1, and had some dependencies targeting different versions when I ran this command. The trick is to identify the dependencies in this list that are targeting previous versions, and overriding that by importing the most recent version of the dependency in Gradle.






                share|improve this answer































                  6














                  I have the same Problem but I solved this By adding
                  those Three Lines



                  implementation 'com.android.support:design:27.1.1'
                  implementation "com.android.support:customtabs:27.1.1"
                  implementation 'com.android.support:mediarouter-v7:27.1.1'


                  now Every thing Works perfectly






                  share|improve this answer































                    6














                    Here is my flow to fix this warning



                    build.gradle



                    android {
                    compileSdkVersion ... // must same version (ex: 26)
                    ...
                    }

                    dependencies {
                    ...
                    compile 'any com.android.support... library' // must same version (ex: 26.0.1)
                    compile 'any com.android.support... library' // must same version (ex: 26.0.1)

                    ...
                    compile ('a library B which don't use 'com.android.support...' OR use SAME version of 'com.android.support'){
                    // do nothing
                    }

                    ...
                    compile ('a library C which use DIFFERENT 'com.android.support...' (ex:27.0.1) {
                    // By default, if use don't do anything here your app will choose the higher com.android.support... for whole project (in this case it is 27.0.1)

                    // If you want to use 26.0.1 use
                    exclude group: 'com.android.support', module: '...' (ex module: 'appcompat-v7')
                    exclude group: 'com.android.support', module: 'another module'
                    ...

                    // If you want to use 27.0.1 do
                    Upgrade `compileSdkVersion` and all 'com.android.support' to 27.0.1.
                    (It may be a good solution because the best practice is always use latest `compileSdkVersion`.
                    However, use 26 or 27 is base on you for example higher library may have bug)
                    }
                    }


                    To view/verify the dependencies of all library in your app

                    Open terminal and run ./gradlew app:dependencies



                    To view the dependencies of a specific library in your app follow tutorial here :- How to exclude dependencies of a particular dependency in Gradle



                    Hope it help






                    share|improve this answer

































                      6














                      After searching and combining answers, 2018 version of this question and it worked for me:



                      1) On navigation tab change it to project view



                      2) Navigate to [YourProjectName]/.idea/libraries/



                      3) Delete all files starting with Gradle__com_android_support_[libraryName]



                      E.g: Gradle__com_android_support_animated_vector_drawable_26_0_0.xml



                      4) In your gradle file define a variable and use it to replace version number like ${variableName}



                      Def variable:



                      ext {
                      support_library_version = '28.0.0' //use the version of choice
                      }


                      Use variable:



                      implementation "com.android.support:cardview-v7:${support_library_version}"


                      example gradle:



                      dependencies {
                      ext {
                      support_library_version = '28.0.0' //use the version of choice
                      }

                      implementation fileTree(include: ['*.jar'], dir: 'libs')

                      implementation "com.android.support:animated-vector-drawable:${support_library_version}"
                      implementation "com.android.support:appcompat-v7:${support_library_version}"
                      implementation "com.android.support:customtabs:${support_library_version}"
                      implementation "com.android.support:cardview-v7:${support_library_version}"
                      implementation "com.android.support:support-compat:${support_library_version}"
                      implementation "com.android.support:support-v4:${support_library_version}"
                      implementation "com.android.support:support-core-utils:${support_library_version}"
                      implementation "com.android.support:support-core-ui:${support_library_version}"
                      implementation "com.android.support:support-fragment:${support_library_version}"
                      implementation "com.android.support:support-media-compat:${support_library_version}"
                      implementation "com.android.support:appcompat-v7:${support_library_version}"
                      implementation "com.android.support:recyclerview-v7:${support_library_version}"
                      implementation "com.android.support:design:${support_library_version}"

                      }





                      share|improve this answer





















                      • 1





                        This answer needs more explanation. A reader could be led to believe they should copy-paste your entire gradle file into their project. You should explain why you added the extension and why you set some support libs to the gplaysvcs version, others to the supportlib version, and some are unchanged.

                        – jungledev
                        Nov 19 '18 at 10:36






                      • 1





                        @jungledev updated for a clearer version

                        – Ali Karaca
                        Nov 19 '18 at 12:11



















                      6














                      in 2018 update for this error add implementation from project structure



                      implementation 'com.android.support:support-v13:28.0.0'


                      in project mode --> External Libraries there you can find your problem, in my case
                      i am using version 28 and external libraries i found
                      com.android.support:support-media-compat-26.0.0 and here was the error.



                      after implementation support v13 and it's working






                      share|improve this answer
























                      • Red underline disappeared with this implementation.

                        – Admiral Kunkka
                        Dec 17 '18 at 15:45



















                      5














                      Open the external library of your project you will see that some library still using previous version although you didn't mention those library so my suggestion is just use the particular library version for those it will solve your problem.






                      share|improve this answer































                        5














                        I just update my Android Support Repository to (revision: 44.0.0);
                        then Android SDK tools and Emulator to latest version 25.3.1 from sdk manager> SDK tools
                        And it solved my problem.






                        share|improve this answer































                          5














                          For me, the error was a result of a third-party library that I imported that used older Google Support Library modules. I simply updated them to the latest version (checking on Github for example), and the error was gone. I suggest checking all the non-Google libraries that you included in your build.gradle are up to date.






                          share|improve this answer































                            5














                            I had to add the following lines in gradle to remove the error



                            compile 'com.android.support:animated-vector-drawable:25.2.0'
                            compile 'com.android.support:preference-v7:25.2.0'
                            compile 'com.android.support:customtabs:25.2.0'
                            compile 'com.android.support:cardview-v7:25.2.0'





                            share|improve this answer































                              5














                              Had the same issue after updating to Android Studio 2.3, the fix was to add the following package in the build.gradle:



                              compile 'com.android.support:support-v13:25.3.1'



                              Note: Change the version to match other support library packages used in your project






                              share|improve this answer































                                5














                                Make sure all Facebook SDK dependencies use the same support library version of your project:



                                dependencies {
                                // Facebook SDK dependencies, excluding Bolts
                                compile "com.android.support:appcompat-v7:25.4.0"
                                compile "com.android.support:cardview-v7:25.4.0"
                                compile "com.android.support:customtabs:25.4.0"
                                compile "com.android.support:design:25.4.0"

                                compile "com.facebook.android:facebook-android-sdk:4.23.0"
                                }





                                share|improve this answer



























                                  1 2
                                  next



                                  Your Answer






                                  StackExchange.ifUsing("editor", function () {
                                  StackExchange.using("externalEditor", function () {
                                  StackExchange.using("snippets", function () {
                                  StackExchange.snippets.init();
                                  });
                                  });
                                  }, "code-snippets");

                                  StackExchange.ready(function() {
                                  var channelOptions = {
                                  tags: "".split(" "),
                                  id: "1"
                                  };
                                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                                  StackExchange.using("externalEditor", function() {
                                  // Have to fire editor after snippets, if snippets enabled
                                  if (StackExchange.settings.snippets.snippetsEnabled) {
                                  StackExchange.using("snippets", function() {
                                  createEditor();
                                  });
                                  }
                                  else {
                                  createEditor();
                                  }
                                  });

                                  function createEditor() {
                                  StackExchange.prepareEditor({
                                  heartbeatType: 'answer',
                                  autoActivateHeartbeat: false,
                                  convertImagesToLinks: true,
                                  noModals: true,
                                  showLowRepImageUploadWarning: true,
                                  reputationToPostImages: 10,
                                  bindNavPrevention: true,
                                  postfix: "",
                                  imageUploader: {
                                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                                  allowUrls: true
                                  },
                                  onDemand: false,
                                  discardSelector: ".discard-answer"
                                  ,immediatelyShowMarkdownHelp:true
                                  });


                                  }
                                  });














                                  draft saved

                                  draft discarded


















                                  StackExchange.ready(
                                  function () {
                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f42374151%2fall-com-android-support-libraries-must-use-the-exact-same-version-specification%23new-answer', 'question_page');
                                  }
                                  );

                                  Post as a guest















                                  Required, but never shown




















                                  StackExchange.ready(function () {
                                  $("#show-editor-button input, #show-editor-button button").click(function () {
                                  var showEditor = function() {
                                  $("#show-editor-button").hide();
                                  $("#post-form").removeClass("dno");
                                  StackExchange.editor.finallyInit();
                                  };

                                  var useFancy = $(this).data('confirm-use-fancy');
                                  if(useFancy == 'True') {
                                  var popupTitle = $(this).data('confirm-fancy-title');
                                  var popupBody = $(this).data('confirm-fancy-body');
                                  var popupAccept = $(this).data('confirm-fancy-accept-button');

                                  $(this).loadPopup({
                                  url: '/post/self-answer-popup',
                                  loaded: function(popup) {
                                  var pTitle = $(popup).find('h2');
                                  var pBody = $(popup).find('.popup-body');
                                  var pSubmit = $(popup).find('.popup-submit');

                                  pTitle.text(popupTitle);
                                  pBody.html(popupBody);
                                  pSubmit.val(popupAccept).click(showEditor);
                                  }
                                  })
                                  } else{
                                  var confirmText = $(this).data('confirm-text');
                                  if (confirmText ? confirm(confirmText) : true) {
                                  showEditor();
                                  }
                                  }
                                  });
                                  });






                                  50 Answers
                                  50






                                  active

                                  oldest

                                  votes








                                  50 Answers
                                  50






                                  active

                                  oldest

                                  votes









                                  active

                                  oldest

                                  votes






                                  active

                                  oldest

                                  votes








                                  1 2
                                  next










                                  787














                                  You can solve this with one of the following solutions:



                                  Update:



                                  As of Android studio 3.0, it becomes much easier as it now shows a more helpful hint, so we only need to follow this hint.

                                  for example:
                                  1]




                                  All com.android.support libraries must use the exact same version
                                  specification (mixing versions can lead to runtime crashes). Found
                                  versions 27.0.2, 26.1.0. Examples include
                                  com.android.support:animated-vector-drawable:27.0.2 and
                                  com.android.support:customtabs:26.1.0



                                  there are some combinations of libraries, or tools and libraries, that
                                  are incompatible, or can lead to bugs. One such incompatibility is
                                  compiling with a version of the Android support libraries that is not
                                  the latest version (or in particular, a version lower than your
                                  targetSdkVersion.)




                                  Solution:

                                  Add explicitly the library with the old version but with a new version number.

                                  in my case com.android.support:customtabs:26.1.0 so I need to add:



                                  implementation "com.android.support:customtabs:27.0.2"  


                                  ie: Take the library from the second item, and implement it with the version number from the first.



                                  Note: don't forget to press sync now so gradle can rebuild the dependency graph and see if there are any more conflicts.



                                  Explanation:

                                  you may be confused by the error message as don't use customtabs so how I have a conflict!!

                                  well.. you didn't use it directly but one of your libraries uses an old version of customtabs internally, so you need to ask for it directly.



                                  if you curious to know which of your libraries is responsible for the old version and maybe ask the author to update his lib, Run a Gradle dependency report, see the old answer to know how.



                                  Note this





                                  Old answer:



                                  inspired by CommonsWare answer:



                                  Run a Gradle dependency report to see what your full tree of
                                  dependencies is.



                                  From there, you will see which one of your libraries are asking for a different version of the Android Support libraries.
                                  For whatever it is asking for, you can ask for it directly with the
                                  25.2.0 version or use Gradle's other conflict resolution approaches to get the same versions.





                                  Update:



                                  As of gradle plugin version: 3.0 compile has been replaced by implementation or api see this answer for the difference.



                                  hence use instead:



                                  ./gradlew -q dependencies app:dependencies --configuration debugAndroidTestCompileClasspath


                                  or for windows cmd:



                                  gradlew -q dependencies app:dependencies --configuration debugAndroidTestCompileClasspath


                                  and search for the conflicted version.



                                  For me, the error disappeared after removing com.google.android.gms:play-services:10.2.0



                                  And only include com.google.android.gms:play-services-location:10.2.0 and com.google.android.gms:play-services-maps:10.2.0 as they are the only two play services that I use.



                                  I think the gms:play-services depend on some old components of the support library, so we need to add them explicitly ourselves.





                                  for AS 3.0 an older.



                                  Run:



                                  ./gradlew -q dependencies <module-name>:dependencies --configuration implementation


                                  Example:



                                  ./gradlew -q dependencies app:dependencies --configuration implementation




                                  if someone knows a better way in the new gradle plugin please let me know.






                                  share|improve this answer





















                                  • 3





                                    com.google.android.gms:play-services:10.2.0 supports SDK 14 and above, if you want to use below SDK 14, you need to use version 10.0.1 as mentioned in stackoverflow.com/a/42315590/6248491

                                    – Sneh Pandya
                                    Feb 21 '17 at 17:53






                                  • 1





                                    my min SDK is 16 it's not the same error.

                                    – humazed
                                    Feb 21 '17 at 17:58






                                  • 2





                                    @humazed noob question, where do I run the command in Android Studio?

                                    – Haikal Nashuha
                                    Mar 20 '17 at 4:12






                                  • 1





                                    in the terminal, but first, try to try the play-services thing

                                    – humazed
                                    Mar 20 '17 at 4:12








                                  • 3





                                    It may be helpful to point out that the examples include text in the error message shows actual examples from your own project, not vague general examples of the type of problem. Take the library from the second item, and implement it with the version number from the first.

                                    – Benjamin Kershner
                                    Apr 18 '18 at 14:03
















                                  787














                                  You can solve this with one of the following solutions:



                                  Update:



                                  As of Android studio 3.0, it becomes much easier as it now shows a more helpful hint, so we only need to follow this hint.

                                  for example:
                                  1]




                                  All com.android.support libraries must use the exact same version
                                  specification (mixing versions can lead to runtime crashes). Found
                                  versions 27.0.2, 26.1.0. Examples include
                                  com.android.support:animated-vector-drawable:27.0.2 and
                                  com.android.support:customtabs:26.1.0



                                  there are some combinations of libraries, or tools and libraries, that
                                  are incompatible, or can lead to bugs. One such incompatibility is
                                  compiling with a version of the Android support libraries that is not
                                  the latest version (or in particular, a version lower than your
                                  targetSdkVersion.)




                                  Solution:

                                  Add explicitly the library with the old version but with a new version number.

                                  in my case com.android.support:customtabs:26.1.0 so I need to add:



                                  implementation "com.android.support:customtabs:27.0.2"  


                                  ie: Take the library from the second item, and implement it with the version number from the first.



                                  Note: don't forget to press sync now so gradle can rebuild the dependency graph and see if there are any more conflicts.



                                  Explanation:

                                  you may be confused by the error message as don't use customtabs so how I have a conflict!!

                                  well.. you didn't use it directly but one of your libraries uses an old version of customtabs internally, so you need to ask for it directly.



                                  if you curious to know which of your libraries is responsible for the old version and maybe ask the author to update his lib, Run a Gradle dependency report, see the old answer to know how.



                                  Note this





                                  Old answer:



                                  inspired by CommonsWare answer:



                                  Run a Gradle dependency report to see what your full tree of
                                  dependencies is.



                                  From there, you will see which one of your libraries are asking for a different version of the Android Support libraries.
                                  For whatever it is asking for, you can ask for it directly with the
                                  25.2.0 version or use Gradle's other conflict resolution approaches to get the same versions.





                                  Update:



                                  As of gradle plugin version: 3.0 compile has been replaced by implementation or api see this answer for the difference.



                                  hence use instead:



                                  ./gradlew -q dependencies app:dependencies --configuration debugAndroidTestCompileClasspath


                                  or for windows cmd:



                                  gradlew -q dependencies app:dependencies --configuration debugAndroidTestCompileClasspath


                                  and search for the conflicted version.



                                  For me, the error disappeared after removing com.google.android.gms:play-services:10.2.0



                                  And only include com.google.android.gms:play-services-location:10.2.0 and com.google.android.gms:play-services-maps:10.2.0 as they are the only two play services that I use.



                                  I think the gms:play-services depend on some old components of the support library, so we need to add them explicitly ourselves.





                                  for AS 3.0 an older.



                                  Run:



                                  ./gradlew -q dependencies <module-name>:dependencies --configuration implementation


                                  Example:



                                  ./gradlew -q dependencies app:dependencies --configuration implementation




                                  if someone knows a better way in the new gradle plugin please let me know.






                                  share|improve this answer





















                                  • 3





                                    com.google.android.gms:play-services:10.2.0 supports SDK 14 and above, if you want to use below SDK 14, you need to use version 10.0.1 as mentioned in stackoverflow.com/a/42315590/6248491

                                    – Sneh Pandya
                                    Feb 21 '17 at 17:53






                                  • 1





                                    my min SDK is 16 it's not the same error.

                                    – humazed
                                    Feb 21 '17 at 17:58






                                  • 2





                                    @humazed noob question, where do I run the command in Android Studio?

                                    – Haikal Nashuha
                                    Mar 20 '17 at 4:12






                                  • 1





                                    in the terminal, but first, try to try the play-services thing

                                    – humazed
                                    Mar 20 '17 at 4:12








                                  • 3





                                    It may be helpful to point out that the examples include text in the error message shows actual examples from your own project, not vague general examples of the type of problem. Take the library from the second item, and implement it with the version number from the first.

                                    – Benjamin Kershner
                                    Apr 18 '18 at 14:03














                                  787












                                  787








                                  787







                                  You can solve this with one of the following solutions:



                                  Update:



                                  As of Android studio 3.0, it becomes much easier as it now shows a more helpful hint, so we only need to follow this hint.

                                  for example:
                                  1]




                                  All com.android.support libraries must use the exact same version
                                  specification (mixing versions can lead to runtime crashes). Found
                                  versions 27.0.2, 26.1.0. Examples include
                                  com.android.support:animated-vector-drawable:27.0.2 and
                                  com.android.support:customtabs:26.1.0



                                  there are some combinations of libraries, or tools and libraries, that
                                  are incompatible, or can lead to bugs. One such incompatibility is
                                  compiling with a version of the Android support libraries that is not
                                  the latest version (or in particular, a version lower than your
                                  targetSdkVersion.)




                                  Solution:

                                  Add explicitly the library with the old version but with a new version number.

                                  in my case com.android.support:customtabs:26.1.0 so I need to add:



                                  implementation "com.android.support:customtabs:27.0.2"  


                                  ie: Take the library from the second item, and implement it with the version number from the first.



                                  Note: don't forget to press sync now so gradle can rebuild the dependency graph and see if there are any more conflicts.



                                  Explanation:

                                  you may be confused by the error message as don't use customtabs so how I have a conflict!!

                                  well.. you didn't use it directly but one of your libraries uses an old version of customtabs internally, so you need to ask for it directly.



                                  if you curious to know which of your libraries is responsible for the old version and maybe ask the author to update his lib, Run a Gradle dependency report, see the old answer to know how.



                                  Note this





                                  Old answer:



                                  inspired by CommonsWare answer:



                                  Run a Gradle dependency report to see what your full tree of
                                  dependencies is.



                                  From there, you will see which one of your libraries are asking for a different version of the Android Support libraries.
                                  For whatever it is asking for, you can ask for it directly with the
                                  25.2.0 version or use Gradle's other conflict resolution approaches to get the same versions.





                                  Update:



                                  As of gradle plugin version: 3.0 compile has been replaced by implementation or api see this answer for the difference.



                                  hence use instead:



                                  ./gradlew -q dependencies app:dependencies --configuration debugAndroidTestCompileClasspath


                                  or for windows cmd:



                                  gradlew -q dependencies app:dependencies --configuration debugAndroidTestCompileClasspath


                                  and search for the conflicted version.



                                  For me, the error disappeared after removing com.google.android.gms:play-services:10.2.0



                                  And only include com.google.android.gms:play-services-location:10.2.0 and com.google.android.gms:play-services-maps:10.2.0 as they are the only two play services that I use.



                                  I think the gms:play-services depend on some old components of the support library, so we need to add them explicitly ourselves.





                                  for AS 3.0 an older.



                                  Run:



                                  ./gradlew -q dependencies <module-name>:dependencies --configuration implementation


                                  Example:



                                  ./gradlew -q dependencies app:dependencies --configuration implementation




                                  if someone knows a better way in the new gradle plugin please let me know.






                                  share|improve this answer















                                  You can solve this with one of the following solutions:



                                  Update:



                                  As of Android studio 3.0, it becomes much easier as it now shows a more helpful hint, so we only need to follow this hint.

                                  for example:
                                  1]




                                  All com.android.support libraries must use the exact same version
                                  specification (mixing versions can lead to runtime crashes). Found
                                  versions 27.0.2, 26.1.0. Examples include
                                  com.android.support:animated-vector-drawable:27.0.2 and
                                  com.android.support:customtabs:26.1.0



                                  there are some combinations of libraries, or tools and libraries, that
                                  are incompatible, or can lead to bugs. One such incompatibility is
                                  compiling with a version of the Android support libraries that is not
                                  the latest version (or in particular, a version lower than your
                                  targetSdkVersion.)




                                  Solution:

                                  Add explicitly the library with the old version but with a new version number.

                                  in my case com.android.support:customtabs:26.1.0 so I need to add:



                                  implementation "com.android.support:customtabs:27.0.2"  


                                  ie: Take the library from the second item, and implement it with the version number from the first.



                                  Note: don't forget to press sync now so gradle can rebuild the dependency graph and see if there are any more conflicts.



                                  Explanation:

                                  you may be confused by the error message as don't use customtabs so how I have a conflict!!

                                  well.. you didn't use it directly but one of your libraries uses an old version of customtabs internally, so you need to ask for it directly.



                                  if you curious to know which of your libraries is responsible for the old version and maybe ask the author to update his lib, Run a Gradle dependency report, see the old answer to know how.



                                  Note this





                                  Old answer:



                                  inspired by CommonsWare answer:



                                  Run a Gradle dependency report to see what your full tree of
                                  dependencies is.



                                  From there, you will see which one of your libraries are asking for a different version of the Android Support libraries.
                                  For whatever it is asking for, you can ask for it directly with the
                                  25.2.0 version or use Gradle's other conflict resolution approaches to get the same versions.





                                  Update:



                                  As of gradle plugin version: 3.0 compile has been replaced by implementation or api see this answer for the difference.



                                  hence use instead:



                                  ./gradlew -q dependencies app:dependencies --configuration debugAndroidTestCompileClasspath


                                  or for windows cmd:



                                  gradlew -q dependencies app:dependencies --configuration debugAndroidTestCompileClasspath


                                  and search for the conflicted version.



                                  For me, the error disappeared after removing com.google.android.gms:play-services:10.2.0



                                  And only include com.google.android.gms:play-services-location:10.2.0 and com.google.android.gms:play-services-maps:10.2.0 as they are the only two play services that I use.



                                  I think the gms:play-services depend on some old components of the support library, so we need to add them explicitly ourselves.





                                  for AS 3.0 an older.



                                  Run:



                                  ./gradlew -q dependencies <module-name>:dependencies --configuration implementation


                                  Example:



                                  ./gradlew -q dependencies app:dependencies --configuration implementation




                                  if someone knows a better way in the new gradle plugin please let me know.







                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited Jan 18 at 15:49

























                                  answered Feb 21 '17 at 17:49









                                  humazedhumazed

                                  35.4k196189




                                  35.4k196189








                                  • 3





                                    com.google.android.gms:play-services:10.2.0 supports SDK 14 and above, if you want to use below SDK 14, you need to use version 10.0.1 as mentioned in stackoverflow.com/a/42315590/6248491

                                    – Sneh Pandya
                                    Feb 21 '17 at 17:53






                                  • 1





                                    my min SDK is 16 it's not the same error.

                                    – humazed
                                    Feb 21 '17 at 17:58






                                  • 2





                                    @humazed noob question, where do I run the command in Android Studio?

                                    – Haikal Nashuha
                                    Mar 20 '17 at 4:12






                                  • 1





                                    in the terminal, but first, try to try the play-services thing

                                    – humazed
                                    Mar 20 '17 at 4:12








                                  • 3





                                    It may be helpful to point out that the examples include text in the error message shows actual examples from your own project, not vague general examples of the type of problem. Take the library from the second item, and implement it with the version number from the first.

                                    – Benjamin Kershner
                                    Apr 18 '18 at 14:03














                                  • 3





                                    com.google.android.gms:play-services:10.2.0 supports SDK 14 and above, if you want to use below SDK 14, you need to use version 10.0.1 as mentioned in stackoverflow.com/a/42315590/6248491

                                    – Sneh Pandya
                                    Feb 21 '17 at 17:53






                                  • 1





                                    my min SDK is 16 it's not the same error.

                                    – humazed
                                    Feb 21 '17 at 17:58






                                  • 2





                                    @humazed noob question, where do I run the command in Android Studio?

                                    – Haikal Nashuha
                                    Mar 20 '17 at 4:12






                                  • 1





                                    in the terminal, but first, try to try the play-services thing

                                    – humazed
                                    Mar 20 '17 at 4:12








                                  • 3





                                    It may be helpful to point out that the examples include text in the error message shows actual examples from your own project, not vague general examples of the type of problem. Take the library from the second item, and implement it with the version number from the first.

                                    – Benjamin Kershner
                                    Apr 18 '18 at 14:03








                                  3




                                  3





                                  com.google.android.gms:play-services:10.2.0 supports SDK 14 and above, if you want to use below SDK 14, you need to use version 10.0.1 as mentioned in stackoverflow.com/a/42315590/6248491

                                  – Sneh Pandya
                                  Feb 21 '17 at 17:53





                                  com.google.android.gms:play-services:10.2.0 supports SDK 14 and above, if you want to use below SDK 14, you need to use version 10.0.1 as mentioned in stackoverflow.com/a/42315590/6248491

                                  – Sneh Pandya
                                  Feb 21 '17 at 17:53




                                  1




                                  1





                                  my min SDK is 16 it's not the same error.

                                  – humazed
                                  Feb 21 '17 at 17:58





                                  my min SDK is 16 it's not the same error.

                                  – humazed
                                  Feb 21 '17 at 17:58




                                  2




                                  2





                                  @humazed noob question, where do I run the command in Android Studio?

                                  – Haikal Nashuha
                                  Mar 20 '17 at 4:12





                                  @humazed noob question, where do I run the command in Android Studio?

                                  – Haikal Nashuha
                                  Mar 20 '17 at 4:12




                                  1




                                  1





                                  in the terminal, but first, try to try the play-services thing

                                  – humazed
                                  Mar 20 '17 at 4:12







                                  in the terminal, but first, try to try the play-services thing

                                  – humazed
                                  Mar 20 '17 at 4:12






                                  3




                                  3





                                  It may be helpful to point out that the examples include text in the error message shows actual examples from your own project, not vague general examples of the type of problem. Take the library from the second item, and implement it with the version number from the first.

                                  – Benjamin Kershner
                                  Apr 18 '18 at 14:03





                                  It may be helpful to point out that the examples include text in the error message shows actual examples from your own project, not vague general examples of the type of problem. Take the library from the second item, and implement it with the version number from the first.

                                  – Benjamin Kershner
                                  Apr 18 '18 at 14:03













                                  195















                                  1. Go to project/.idea/libraries folder on your file system and see which libraries are different.

                                  2. You will have to manually include these libraries with the same version in your build.gradle file.

                                  3. Then, sync your project.


                                  E.g.:



                                  compile 'com.android.support:appcompat-v7:25.2.0'

                                  // Wrong library version found on 1st point
                                  compile 'com.android.support:customtabs:25.2.0'





                                  share|improve this answer


























                                  • Good point. I never thought about taking a look which one actually was the wrong one. :S Thanks!

                                    – Tobias Reich
                                    Mar 6 '17 at 14:26











                                  • works when gradle automatic resolving method doesn't, thanks

                                    – Odaym
                                    Mar 6 '17 at 20:03






                                  • 9





                                    in /Project Files/My project/.idea/libraries there are multiple support files with different version. Now how would I know which module or dependency is using this?

                                    – Satpal Yadav
                                    Mar 30 '17 at 11:27








                                  • 2





                                    @SatpalYadav I've searched for the version not matching the newest one available (I use in my app). E.g. I use support:design:25.3.1 but material-dialogs uses support-v13:25.1.1. So I've added support-v13:25.3.1 and the error disappears.

                                    – hardysim
                                    May 9 '17 at 7:25






                                  • 1





                                    Thats the best solution for me so far but how can I override newer libs?

                                    – Mateusz Kaflowski
                                    Mar 23 '18 at 14:42
















                                  195















                                  1. Go to project/.idea/libraries folder on your file system and see which libraries are different.

                                  2. You will have to manually include these libraries with the same version in your build.gradle file.

                                  3. Then, sync your project.


                                  E.g.:



                                  compile 'com.android.support:appcompat-v7:25.2.0'

                                  // Wrong library version found on 1st point
                                  compile 'com.android.support:customtabs:25.2.0'





                                  share|improve this answer


























                                  • Good point. I never thought about taking a look which one actually was the wrong one. :S Thanks!

                                    – Tobias Reich
                                    Mar 6 '17 at 14:26











                                  • works when gradle automatic resolving method doesn't, thanks

                                    – Odaym
                                    Mar 6 '17 at 20:03






                                  • 9





                                    in /Project Files/My project/.idea/libraries there are multiple support files with different version. Now how would I know which module or dependency is using this?

                                    – Satpal Yadav
                                    Mar 30 '17 at 11:27








                                  • 2





                                    @SatpalYadav I've searched for the version not matching the newest one available (I use in my app). E.g. I use support:design:25.3.1 but material-dialogs uses support-v13:25.1.1. So I've added support-v13:25.3.1 and the error disappears.

                                    – hardysim
                                    May 9 '17 at 7:25






                                  • 1





                                    Thats the best solution for me so far but how can I override newer libs?

                                    – Mateusz Kaflowski
                                    Mar 23 '18 at 14:42














                                  195












                                  195








                                  195








                                  1. Go to project/.idea/libraries folder on your file system and see which libraries are different.

                                  2. You will have to manually include these libraries with the same version in your build.gradle file.

                                  3. Then, sync your project.


                                  E.g.:



                                  compile 'com.android.support:appcompat-v7:25.2.0'

                                  // Wrong library version found on 1st point
                                  compile 'com.android.support:customtabs:25.2.0'





                                  share|improve this answer
















                                  1. Go to project/.idea/libraries folder on your file system and see which libraries are different.

                                  2. You will have to manually include these libraries with the same version in your build.gradle file.

                                  3. Then, sync your project.


                                  E.g.:



                                  compile 'com.android.support:appcompat-v7:25.2.0'

                                  // Wrong library version found on 1st point
                                  compile 'com.android.support:customtabs:25.2.0'






                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited Jan 13 '18 at 17:53









                                  cricket_007

                                  82.7k1144112




                                  82.7k1144112










                                  answered Mar 3 '17 at 12:31









                                  João Paulo PaivaJoão Paulo Paiva

                                  2,027165




                                  2,027165













                                  • Good point. I never thought about taking a look which one actually was the wrong one. :S Thanks!

                                    – Tobias Reich
                                    Mar 6 '17 at 14:26











                                  • works when gradle automatic resolving method doesn't, thanks

                                    – Odaym
                                    Mar 6 '17 at 20:03






                                  • 9





                                    in /Project Files/My project/.idea/libraries there are multiple support files with different version. Now how would I know which module or dependency is using this?

                                    – Satpal Yadav
                                    Mar 30 '17 at 11:27








                                  • 2





                                    @SatpalYadav I've searched for the version not matching the newest one available (I use in my app). E.g. I use support:design:25.3.1 but material-dialogs uses support-v13:25.1.1. So I've added support-v13:25.3.1 and the error disappears.

                                    – hardysim
                                    May 9 '17 at 7:25






                                  • 1





                                    Thats the best solution for me so far but how can I override newer libs?

                                    – Mateusz Kaflowski
                                    Mar 23 '18 at 14:42



















                                  • Good point. I never thought about taking a look which one actually was the wrong one. :S Thanks!

                                    – Tobias Reich
                                    Mar 6 '17 at 14:26











                                  • works when gradle automatic resolving method doesn't, thanks

                                    – Odaym
                                    Mar 6 '17 at 20:03






                                  • 9





                                    in /Project Files/My project/.idea/libraries there are multiple support files with different version. Now how would I know which module or dependency is using this?

                                    – Satpal Yadav
                                    Mar 30 '17 at 11:27








                                  • 2





                                    @SatpalYadav I've searched for the version not matching the newest one available (I use in my app). E.g. I use support:design:25.3.1 but material-dialogs uses support-v13:25.1.1. So I've added support-v13:25.3.1 and the error disappears.

                                    – hardysim
                                    May 9 '17 at 7:25






                                  • 1





                                    Thats the best solution for me so far but how can I override newer libs?

                                    – Mateusz Kaflowski
                                    Mar 23 '18 at 14:42

















                                  Good point. I never thought about taking a look which one actually was the wrong one. :S Thanks!

                                  – Tobias Reich
                                  Mar 6 '17 at 14:26





                                  Good point. I never thought about taking a look which one actually was the wrong one. :S Thanks!

                                  – Tobias Reich
                                  Mar 6 '17 at 14:26













                                  works when gradle automatic resolving method doesn't, thanks

                                  – Odaym
                                  Mar 6 '17 at 20:03





                                  works when gradle automatic resolving method doesn't, thanks

                                  – Odaym
                                  Mar 6 '17 at 20:03




                                  9




                                  9





                                  in /Project Files/My project/.idea/libraries there are multiple support files with different version. Now how would I know which module or dependency is using this?

                                  – Satpal Yadav
                                  Mar 30 '17 at 11:27







                                  in /Project Files/My project/.idea/libraries there are multiple support files with different version. Now how would I know which module or dependency is using this?

                                  – Satpal Yadav
                                  Mar 30 '17 at 11:27






                                  2




                                  2





                                  @SatpalYadav I've searched for the version not matching the newest one available (I use in my app). E.g. I use support:design:25.3.1 but material-dialogs uses support-v13:25.1.1. So I've added support-v13:25.3.1 and the error disappears.

                                  – hardysim
                                  May 9 '17 at 7:25





                                  @SatpalYadav I've searched for the version not matching the newest one available (I use in my app). E.g. I use support:design:25.3.1 but material-dialogs uses support-v13:25.1.1. So I've added support-v13:25.3.1 and the error disappears.

                                  – hardysim
                                  May 9 '17 at 7:25




                                  1




                                  1





                                  Thats the best solution for me so far but how can I override newer libs?

                                  – Mateusz Kaflowski
                                  Mar 23 '18 at 14:42





                                  Thats the best solution for me so far but how can I override newer libs?

                                  – Mateusz Kaflowski
                                  Mar 23 '18 at 14:42











                                  141














                                  For all cases, not just for these versions or libraries:



                                  Pay attention to the little information window that say something about the error, it says the examples that you have to change and add.



                                  In this case:




                                  Found versions 25.1.1, 24.0.0. Examples include com.android.support:animated-vector-drawable:25.1.1 and
                                  com.android.support:mediarouter-v7:24.0.0




                                  Your




                                  com.android.support:animated-vector-drawable:25.1.1




                                  is version 25.1.1, and your




                                  com.android.support:mediarouter-v7:24.0.0




                                  is version 24.0.0, so you have to add the mediarouter with the same version:



                                  com.android.support:mediarouter-v7:25.1.1


                                  And do that for every example that the little information window says, in this case all the libraries that doesn't have the version 25.1.1.



                                  You have to sync the gradle after you fix the indicated library to see the next library and package that you have to change.



                                  IMPORTANT:



                                  If you are not explicitly using one or more specified libraries and it is giving you the error, it means that is being used internally by another library, compile it explicitly anyway.



                                  You also can use another method to see the difference of the versions of all the libraries that you are actually compiling (like run a gradle dependency report or go to your libraries files), the real objetive is compile all the libraries that you are using with the same version.






                                  share|improve this answer





















                                  • 1





                                    thanks a ton, can you please explain what support:mediarouter exactly does ?

                                    – mrid
                                    Dec 9 '17 at 7:34






                                  • 1





                                    I think this is something you have pointed out that most of us have over looked. And ie- "Pay attention to the little information window that say something about the error....". Thank you, this is now given me a better understanding of what is really happening.

                                    – Yo Apps
                                    Dec 18 '18 at 14:42


















                                  141














                                  For all cases, not just for these versions or libraries:



                                  Pay attention to the little information window that say something about the error, it says the examples that you have to change and add.



                                  In this case:




                                  Found versions 25.1.1, 24.0.0. Examples include com.android.support:animated-vector-drawable:25.1.1 and
                                  com.android.support:mediarouter-v7:24.0.0




                                  Your




                                  com.android.support:animated-vector-drawable:25.1.1




                                  is version 25.1.1, and your




                                  com.android.support:mediarouter-v7:24.0.0




                                  is version 24.0.0, so you have to add the mediarouter with the same version:



                                  com.android.support:mediarouter-v7:25.1.1


                                  And do that for every example that the little information window says, in this case all the libraries that doesn't have the version 25.1.1.



                                  You have to sync the gradle after you fix the indicated library to see the next library and package that you have to change.



                                  IMPORTANT:



                                  If you are not explicitly using one or more specified libraries and it is giving you the error, it means that is being used internally by another library, compile it explicitly anyway.



                                  You also can use another method to see the difference of the versions of all the libraries that you are actually compiling (like run a gradle dependency report or go to your libraries files), the real objetive is compile all the libraries that you are using with the same version.






                                  share|improve this answer





















                                  • 1





                                    thanks a ton, can you please explain what support:mediarouter exactly does ?

                                    – mrid
                                    Dec 9 '17 at 7:34






                                  • 1





                                    I think this is something you have pointed out that most of us have over looked. And ie- "Pay attention to the little information window that say something about the error....". Thank you, this is now given me a better understanding of what is really happening.

                                    – Yo Apps
                                    Dec 18 '18 at 14:42
















                                  141












                                  141








                                  141







                                  For all cases, not just for these versions or libraries:



                                  Pay attention to the little information window that say something about the error, it says the examples that you have to change and add.



                                  In this case:




                                  Found versions 25.1.1, 24.0.0. Examples include com.android.support:animated-vector-drawable:25.1.1 and
                                  com.android.support:mediarouter-v7:24.0.0




                                  Your




                                  com.android.support:animated-vector-drawable:25.1.1




                                  is version 25.1.1, and your




                                  com.android.support:mediarouter-v7:24.0.0




                                  is version 24.0.0, so you have to add the mediarouter with the same version:



                                  com.android.support:mediarouter-v7:25.1.1


                                  And do that for every example that the little information window says, in this case all the libraries that doesn't have the version 25.1.1.



                                  You have to sync the gradle after you fix the indicated library to see the next library and package that you have to change.



                                  IMPORTANT:



                                  If you are not explicitly using one or more specified libraries and it is giving you the error, it means that is being used internally by another library, compile it explicitly anyway.



                                  You also can use another method to see the difference of the versions of all the libraries that you are actually compiling (like run a gradle dependency report or go to your libraries files), the real objetive is compile all the libraries that you are using with the same version.






                                  share|improve this answer















                                  For all cases, not just for these versions or libraries:



                                  Pay attention to the little information window that say something about the error, it says the examples that you have to change and add.



                                  In this case:




                                  Found versions 25.1.1, 24.0.0. Examples include com.android.support:animated-vector-drawable:25.1.1 and
                                  com.android.support:mediarouter-v7:24.0.0




                                  Your




                                  com.android.support:animated-vector-drawable:25.1.1




                                  is version 25.1.1, and your




                                  com.android.support:mediarouter-v7:24.0.0




                                  is version 24.0.0, so you have to add the mediarouter with the same version:



                                  com.android.support:mediarouter-v7:25.1.1


                                  And do that for every example that the little information window says, in this case all the libraries that doesn't have the version 25.1.1.



                                  You have to sync the gradle after you fix the indicated library to see the next library and package that you have to change.



                                  IMPORTANT:



                                  If you are not explicitly using one or more specified libraries and it is giving you the error, it means that is being used internally by another library, compile it explicitly anyway.



                                  You also can use another method to see the difference of the versions of all the libraries that you are actually compiling (like run a gradle dependency report or go to your libraries files), the real objetive is compile all the libraries that you are using with the same version.







                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited Sep 22 '17 at 17:08

























                                  answered Mar 7 '17 at 18:41









                                  Brandon ZamudioBrandon Zamudio

                                  2,34741232




                                  2,34741232








                                  • 1





                                    thanks a ton, can you please explain what support:mediarouter exactly does ?

                                    – mrid
                                    Dec 9 '17 at 7:34






                                  • 1





                                    I think this is something you have pointed out that most of us have over looked. And ie- "Pay attention to the little information window that say something about the error....". Thank you, this is now given me a better understanding of what is really happening.

                                    – Yo Apps
                                    Dec 18 '18 at 14:42
















                                  • 1





                                    thanks a ton, can you please explain what support:mediarouter exactly does ?

                                    – mrid
                                    Dec 9 '17 at 7:34






                                  • 1





                                    I think this is something you have pointed out that most of us have over looked. And ie- "Pay attention to the little information window that say something about the error....". Thank you, this is now given me a better understanding of what is really happening.

                                    – Yo Apps
                                    Dec 18 '18 at 14:42










                                  1




                                  1





                                  thanks a ton, can you please explain what support:mediarouter exactly does ?

                                  – mrid
                                  Dec 9 '17 at 7:34





                                  thanks a ton, can you please explain what support:mediarouter exactly does ?

                                  – mrid
                                  Dec 9 '17 at 7:34




                                  1




                                  1





                                  I think this is something you have pointed out that most of us have over looked. And ie- "Pay attention to the little information window that say something about the error....". Thank you, this is now given me a better understanding of what is really happening.

                                  – Yo Apps
                                  Dec 18 '18 at 14:42







                                  I think this is something you have pointed out that most of us have over looked. And ie- "Pay attention to the little information window that say something about the error....". Thank you, this is now given me a better understanding of what is really happening.

                                  – Yo Apps
                                  Dec 18 '18 at 14:42













                                  88














                                  Add this to the very end of your build.gradle (Module:app):



                                  configurations.all {
                                  resolutionStrategy.eachDependency { DependencyResolveDetails details ->
                                  def requested = details.requested
                                  if (requested.group == 'com.android.support') {
                                  if (!requested.name.startsWith("multidex")) {
                                  details.useVersion '25.3.1'
                                  }
                                  }

                                  }
                                  }


                                  Make sure that you replace '25.3.1' with the version of the android support library that you want to use for all the dependencies , it should not be lower than your complile sdk version



                                  than re sync gradle






                                  share|improve this answer



















                                  • 3





                                    This is what I needed, one of my dependencies was pulling in 27.0.1 somehow, even when I specified a lesser version at the top level. Out of curiosity, why do you exclude the "multidex"?

                                    – ray
                                    Nov 20 '17 at 18:43











                                  • @ray Glad it helped, as per the documentation : developer.android.com/topic/libraries/support-library/… the multidex is the only support library of the "com.android.support" group that use a different version identifier, on the link a provided it is version 1.0.0 , the most recent being 1.0.1 as you can see here : developer.android.com/studio/build/multidex.html#mdex-gradle

                                    – ezzou
                                    Nov 22 '17 at 22:27








                                  • 2





                                    This has saved the day for me. But this android development is becoming even more fragmented every passing thay. People need to really check every support library perfectly before rolling it out. We don't always have the luxery of time to go through each new support release because we want to focus on building our products rather than going through all this. It's frustrating always

                                    – larrytech
                                    Dec 19 '17 at 21:59











                                  • thank you so much for your solution, this relates to Groovy techniques and syntax, but in Android studio - gradle file, we can't show any suggestion (use Ctrl + Space) when write something like this. Do you know any plugin/tool to show suggestion when write Groovy code in gradle file, instead of copy/paste some code that we don't remember or understand.

                                    – Think Twice Code Once
                                    Jul 1 '18 at 4:15






                                  • 1





                                    @ThinkTwiceCodeOnce You can go here to learn more about groovy, and its inteliji plugins : jetbrains.com/help/idea/getting-started-with-groovy.html

                                    – ezzou
                                    Jul 5 '18 at 3:59
















                                  88














                                  Add this to the very end of your build.gradle (Module:app):



                                  configurations.all {
                                  resolutionStrategy.eachDependency { DependencyResolveDetails details ->
                                  def requested = details.requested
                                  if (requested.group == 'com.android.support') {
                                  if (!requested.name.startsWith("multidex")) {
                                  details.useVersion '25.3.1'
                                  }
                                  }

                                  }
                                  }


                                  Make sure that you replace '25.3.1' with the version of the android support library that you want to use for all the dependencies , it should not be lower than your complile sdk version



                                  than re sync gradle






                                  share|improve this answer



















                                  • 3





                                    This is what I needed, one of my dependencies was pulling in 27.0.1 somehow, even when I specified a lesser version at the top level. Out of curiosity, why do you exclude the "multidex"?

                                    – ray
                                    Nov 20 '17 at 18:43











                                  • @ray Glad it helped, as per the documentation : developer.android.com/topic/libraries/support-library/… the multidex is the only support library of the "com.android.support" group that use a different version identifier, on the link a provided it is version 1.0.0 , the most recent being 1.0.1 as you can see here : developer.android.com/studio/build/multidex.html#mdex-gradle

                                    – ezzou
                                    Nov 22 '17 at 22:27








                                  • 2





                                    This has saved the day for me. But this android development is becoming even more fragmented every passing thay. People need to really check every support library perfectly before rolling it out. We don't always have the luxery of time to go through each new support release because we want to focus on building our products rather than going through all this. It's frustrating always

                                    – larrytech
                                    Dec 19 '17 at 21:59











                                  • thank you so much for your solution, this relates to Groovy techniques and syntax, but in Android studio - gradle file, we can't show any suggestion (use Ctrl + Space) when write something like this. Do you know any plugin/tool to show suggestion when write Groovy code in gradle file, instead of copy/paste some code that we don't remember or understand.

                                    – Think Twice Code Once
                                    Jul 1 '18 at 4:15






                                  • 1





                                    @ThinkTwiceCodeOnce You can go here to learn more about groovy, and its inteliji plugins : jetbrains.com/help/idea/getting-started-with-groovy.html

                                    – ezzou
                                    Jul 5 '18 at 3:59














                                  88












                                  88








                                  88







                                  Add this to the very end of your build.gradle (Module:app):



                                  configurations.all {
                                  resolutionStrategy.eachDependency { DependencyResolveDetails details ->
                                  def requested = details.requested
                                  if (requested.group == 'com.android.support') {
                                  if (!requested.name.startsWith("multidex")) {
                                  details.useVersion '25.3.1'
                                  }
                                  }

                                  }
                                  }


                                  Make sure that you replace '25.3.1' with the version of the android support library that you want to use for all the dependencies , it should not be lower than your complile sdk version



                                  than re sync gradle






                                  share|improve this answer













                                  Add this to the very end of your build.gradle (Module:app):



                                  configurations.all {
                                  resolutionStrategy.eachDependency { DependencyResolveDetails details ->
                                  def requested = details.requested
                                  if (requested.group == 'com.android.support') {
                                  if (!requested.name.startsWith("multidex")) {
                                  details.useVersion '25.3.1'
                                  }
                                  }

                                  }
                                  }


                                  Make sure that you replace '25.3.1' with the version of the android support library that you want to use for all the dependencies , it should not be lower than your complile sdk version



                                  than re sync gradle







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Oct 26 '17 at 20:56









                                  ezzouezzou

                                  97646




                                  97646








                                  • 3





                                    This is what I needed, one of my dependencies was pulling in 27.0.1 somehow, even when I specified a lesser version at the top level. Out of curiosity, why do you exclude the "multidex"?

                                    – ray
                                    Nov 20 '17 at 18:43











                                  • @ray Glad it helped, as per the documentation : developer.android.com/topic/libraries/support-library/… the multidex is the only support library of the "com.android.support" group that use a different version identifier, on the link a provided it is version 1.0.0 , the most recent being 1.0.1 as you can see here : developer.android.com/studio/build/multidex.html#mdex-gradle

                                    – ezzou
                                    Nov 22 '17 at 22:27








                                  • 2





                                    This has saved the day for me. But this android development is becoming even more fragmented every passing thay. People need to really check every support library perfectly before rolling it out. We don't always have the luxery of time to go through each new support release because we want to focus on building our products rather than going through all this. It's frustrating always

                                    – larrytech
                                    Dec 19 '17 at 21:59











                                  • thank you so much for your solution, this relates to Groovy techniques and syntax, but in Android studio - gradle file, we can't show any suggestion (use Ctrl + Space) when write something like this. Do you know any plugin/tool to show suggestion when write Groovy code in gradle file, instead of copy/paste some code that we don't remember or understand.

                                    – Think Twice Code Once
                                    Jul 1 '18 at 4:15






                                  • 1





                                    @ThinkTwiceCodeOnce You can go here to learn more about groovy, and its inteliji plugins : jetbrains.com/help/idea/getting-started-with-groovy.html

                                    – ezzou
                                    Jul 5 '18 at 3:59














                                  • 3





                                    This is what I needed, one of my dependencies was pulling in 27.0.1 somehow, even when I specified a lesser version at the top level. Out of curiosity, why do you exclude the "multidex"?

                                    – ray
                                    Nov 20 '17 at 18:43











                                  • @ray Glad it helped, as per the documentation : developer.android.com/topic/libraries/support-library/… the multidex is the only support library of the "com.android.support" group that use a different version identifier, on the link a provided it is version 1.0.0 , the most recent being 1.0.1 as you can see here : developer.android.com/studio/build/multidex.html#mdex-gradle

                                    – ezzou
                                    Nov 22 '17 at 22:27








                                  • 2





                                    This has saved the day for me. But this android development is becoming even more fragmented every passing thay. People need to really check every support library perfectly before rolling it out. We don't always have the luxery of time to go through each new support release because we want to focus on building our products rather than going through all this. It's frustrating always

                                    – larrytech
                                    Dec 19 '17 at 21:59











                                  • thank you so much for your solution, this relates to Groovy techniques and syntax, but in Android studio - gradle file, we can't show any suggestion (use Ctrl + Space) when write something like this. Do you know any plugin/tool to show suggestion when write Groovy code in gradle file, instead of copy/paste some code that we don't remember or understand.

                                    – Think Twice Code Once
                                    Jul 1 '18 at 4:15






                                  • 1





                                    @ThinkTwiceCodeOnce You can go here to learn more about groovy, and its inteliji plugins : jetbrains.com/help/idea/getting-started-with-groovy.html

                                    – ezzou
                                    Jul 5 '18 at 3:59








                                  3




                                  3





                                  This is what I needed, one of my dependencies was pulling in 27.0.1 somehow, even when I specified a lesser version at the top level. Out of curiosity, why do you exclude the "multidex"?

                                  – ray
                                  Nov 20 '17 at 18:43





                                  This is what I needed, one of my dependencies was pulling in 27.0.1 somehow, even when I specified a lesser version at the top level. Out of curiosity, why do you exclude the "multidex"?

                                  – ray
                                  Nov 20 '17 at 18:43













                                  @ray Glad it helped, as per the documentation : developer.android.com/topic/libraries/support-library/… the multidex is the only support library of the "com.android.support" group that use a different version identifier, on the link a provided it is version 1.0.0 , the most recent being 1.0.1 as you can see here : developer.android.com/studio/build/multidex.html#mdex-gradle

                                  – ezzou
                                  Nov 22 '17 at 22:27







                                  @ray Glad it helped, as per the documentation : developer.android.com/topic/libraries/support-library/… the multidex is the only support library of the "com.android.support" group that use a different version identifier, on the link a provided it is version 1.0.0 , the most recent being 1.0.1 as you can see here : developer.android.com/studio/build/multidex.html#mdex-gradle

                                  – ezzou
                                  Nov 22 '17 at 22:27






                                  2




                                  2





                                  This has saved the day for me. But this android development is becoming even more fragmented every passing thay. People need to really check every support library perfectly before rolling it out. We don't always have the luxery of time to go through each new support release because we want to focus on building our products rather than going through all this. It's frustrating always

                                  – larrytech
                                  Dec 19 '17 at 21:59





                                  This has saved the day for me. But this android development is becoming even more fragmented every passing thay. People need to really check every support library perfectly before rolling it out. We don't always have the luxery of time to go through each new support release because we want to focus on building our products rather than going through all this. It's frustrating always

                                  – larrytech
                                  Dec 19 '17 at 21:59













                                  thank you so much for your solution, this relates to Groovy techniques and syntax, but in Android studio - gradle file, we can't show any suggestion (use Ctrl + Space) when write something like this. Do you know any plugin/tool to show suggestion when write Groovy code in gradle file, instead of copy/paste some code that we don't remember or understand.

                                  – Think Twice Code Once
                                  Jul 1 '18 at 4:15





                                  thank you so much for your solution, this relates to Groovy techniques and syntax, but in Android studio - gradle file, we can't show any suggestion (use Ctrl + Space) when write something like this. Do you know any plugin/tool to show suggestion when write Groovy code in gradle file, instead of copy/paste some code that we don't remember or understand.

                                  – Think Twice Code Once
                                  Jul 1 '18 at 4:15




                                  1




                                  1





                                  @ThinkTwiceCodeOnce You can go here to learn more about groovy, and its inteliji plugins : jetbrains.com/help/idea/getting-started-with-groovy.html

                                  – ezzou
                                  Jul 5 '18 at 3:59





                                  @ThinkTwiceCodeOnce You can go here to learn more about groovy, and its inteliji plugins : jetbrains.com/help/idea/getting-started-with-groovy.html

                                  – ezzou
                                  Jul 5 '18 at 3:59











                                  73














                                  The best way to solve the problem is implement all 'com.android.support:...' suggested by android studio



                                  (doesn't matter which support versions you are using -- 27.1.1, 28.0.0 etc..)



                                  place the cursor to the error line eg:




                                  implementation 'com.android.support:appcompat-v7:28.0.0'



                                  android studio will suggest you which 'com.android.support:...' is different version than
                                  'com.android.support:appcompat-v7:28.0.0'



                                  example




                                  All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 27.1.0, 27.0.2. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:exifinterface:27.1.0




                                  so add com.android.support:animated-vector-drawable:28.0.0
                                  & com.android.support:exifinterface:28.0.0.
                                  now synch gradle file.



                                  one by one try to implement all the suggested 'com.android.support:...' till there is no error in this line implementation 'com.android.support:appcompat-v7:28.0.0'



                                  In my case, i added



                                  implementation 'com.android.support:appcompat-v7:28.0.0'

                                  implementation 'com.android.support:animated-vector-drawable:28.0.0'
                                  implementation 'com.android.support:exifinterface:28.0.0'
                                  implementation 'com.android.support:cardview-v7:28.0.0'
                                  implementation 'com.android.support:customtabs:28.0.0'
                                  implementation 'com.android.support:support-media-compat:28.0.0'
                                  implementation 'com.android.support:support-v4:28.0.0'


                                  all this dependencies... it could be different for others.






                                  share|improve this answer






























                                    73














                                    The best way to solve the problem is implement all 'com.android.support:...' suggested by android studio



                                    (doesn't matter which support versions you are using -- 27.1.1, 28.0.0 etc..)



                                    place the cursor to the error line eg:




                                    implementation 'com.android.support:appcompat-v7:28.0.0'



                                    android studio will suggest you which 'com.android.support:...' is different version than
                                    'com.android.support:appcompat-v7:28.0.0'



                                    example




                                    All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 27.1.0, 27.0.2. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:exifinterface:27.1.0




                                    so add com.android.support:animated-vector-drawable:28.0.0
                                    & com.android.support:exifinterface:28.0.0.
                                    now synch gradle file.



                                    one by one try to implement all the suggested 'com.android.support:...' till there is no error in this line implementation 'com.android.support:appcompat-v7:28.0.0'



                                    In my case, i added



                                    implementation 'com.android.support:appcompat-v7:28.0.0'

                                    implementation 'com.android.support:animated-vector-drawable:28.0.0'
                                    implementation 'com.android.support:exifinterface:28.0.0'
                                    implementation 'com.android.support:cardview-v7:28.0.0'
                                    implementation 'com.android.support:customtabs:28.0.0'
                                    implementation 'com.android.support:support-media-compat:28.0.0'
                                    implementation 'com.android.support:support-v4:28.0.0'


                                    all this dependencies... it could be different for others.






                                    share|improve this answer




























                                      73












                                      73








                                      73







                                      The best way to solve the problem is implement all 'com.android.support:...' suggested by android studio



                                      (doesn't matter which support versions you are using -- 27.1.1, 28.0.0 etc..)



                                      place the cursor to the error line eg:




                                      implementation 'com.android.support:appcompat-v7:28.0.0'



                                      android studio will suggest you which 'com.android.support:...' is different version than
                                      'com.android.support:appcompat-v7:28.0.0'



                                      example




                                      All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 27.1.0, 27.0.2. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:exifinterface:27.1.0




                                      so add com.android.support:animated-vector-drawable:28.0.0
                                      & com.android.support:exifinterface:28.0.0.
                                      now synch gradle file.



                                      one by one try to implement all the suggested 'com.android.support:...' till there is no error in this line implementation 'com.android.support:appcompat-v7:28.0.0'



                                      In my case, i added



                                      implementation 'com.android.support:appcompat-v7:28.0.0'

                                      implementation 'com.android.support:animated-vector-drawable:28.0.0'
                                      implementation 'com.android.support:exifinterface:28.0.0'
                                      implementation 'com.android.support:cardview-v7:28.0.0'
                                      implementation 'com.android.support:customtabs:28.0.0'
                                      implementation 'com.android.support:support-media-compat:28.0.0'
                                      implementation 'com.android.support:support-v4:28.0.0'


                                      all this dependencies... it could be different for others.






                                      share|improve this answer















                                      The best way to solve the problem is implement all 'com.android.support:...' suggested by android studio



                                      (doesn't matter which support versions you are using -- 27.1.1, 28.0.0 etc..)



                                      place the cursor to the error line eg:




                                      implementation 'com.android.support:appcompat-v7:28.0.0'



                                      android studio will suggest you which 'com.android.support:...' is different version than
                                      'com.android.support:appcompat-v7:28.0.0'



                                      example




                                      All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 27.1.0, 27.0.2. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:exifinterface:27.1.0




                                      so add com.android.support:animated-vector-drawable:28.0.0
                                      & com.android.support:exifinterface:28.0.0.
                                      now synch gradle file.



                                      one by one try to implement all the suggested 'com.android.support:...' till there is no error in this line implementation 'com.android.support:appcompat-v7:28.0.0'



                                      In my case, i added



                                      implementation 'com.android.support:appcompat-v7:28.0.0'

                                      implementation 'com.android.support:animated-vector-drawable:28.0.0'
                                      implementation 'com.android.support:exifinterface:28.0.0'
                                      implementation 'com.android.support:cardview-v7:28.0.0'
                                      implementation 'com.android.support:customtabs:28.0.0'
                                      implementation 'com.android.support:support-media-compat:28.0.0'
                                      implementation 'com.android.support:support-v4:28.0.0'


                                      all this dependencies... it could be different for others.







                                      share|improve this answer














                                      share|improve this answer



                                      share|improve this answer








                                      edited Oct 1 '18 at 5:53

























                                      answered Jul 20 '18 at 6:14









                                      Adarsh Vijayan PAdarsh Vijayan P

                                      841312




                                      841312























                                          53














                                          I had the exact same problem after updating to Android Studio 2.3



                                          Adding this line to dependencies solved my problem:



                                          compile 'com.android.support:customtabs:25.2.0'





                                          share|improve this answer



















                                          • 2





                                            I had the exact same problem after updating to Android Studio 2.3

                                            – Plugie
                                            Mar 4 '17 at 11:11






                                          • 1





                                            For anyone using RenderScript, I set renderscriptSupportModeEnabled false this to false. And added compile 'com.android.support:customtabs:25.2.0' and error went away.

                                            – Law Gimenez
                                            Mar 6 '17 at 9:15








                                          • 1





                                            @LawGimenez And how should we use renderscript if we just disabled it?

                                            – dor506
                                            Mar 7 '17 at 12:40








                                          • 3





                                            looks like my problem is because of renderscript too, but what if i need renderscript for something else, not for customtabs?

                                            – HendraWD
                                            Mar 13 '17 at 8:38
















                                          53














                                          I had the exact same problem after updating to Android Studio 2.3



                                          Adding this line to dependencies solved my problem:



                                          compile 'com.android.support:customtabs:25.2.0'





                                          share|improve this answer



















                                          • 2





                                            I had the exact same problem after updating to Android Studio 2.3

                                            – Plugie
                                            Mar 4 '17 at 11:11






                                          • 1





                                            For anyone using RenderScript, I set renderscriptSupportModeEnabled false this to false. And added compile 'com.android.support:customtabs:25.2.0' and error went away.

                                            – Law Gimenez
                                            Mar 6 '17 at 9:15








                                          • 1





                                            @LawGimenez And how should we use renderscript if we just disabled it?

                                            – dor506
                                            Mar 7 '17 at 12:40








                                          • 3





                                            looks like my problem is because of renderscript too, but what if i need renderscript for something else, not for customtabs?

                                            – HendraWD
                                            Mar 13 '17 at 8:38














                                          53












                                          53








                                          53







                                          I had the exact same problem after updating to Android Studio 2.3



                                          Adding this line to dependencies solved my problem:



                                          compile 'com.android.support:customtabs:25.2.0'





                                          share|improve this answer













                                          I had the exact same problem after updating to Android Studio 2.3



                                          Adding this line to dependencies solved my problem:



                                          compile 'com.android.support:customtabs:25.2.0'






                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Mar 3 '17 at 22:01









                                          Berat Baran CevikBerat Baran Cevik

                                          1,06831122




                                          1,06831122








                                          • 2





                                            I had the exact same problem after updating to Android Studio 2.3

                                            – Plugie
                                            Mar 4 '17 at 11:11






                                          • 1





                                            For anyone using RenderScript, I set renderscriptSupportModeEnabled false this to false. And added compile 'com.android.support:customtabs:25.2.0' and error went away.

                                            – Law Gimenez
                                            Mar 6 '17 at 9:15








                                          • 1





                                            @LawGimenez And how should we use renderscript if we just disabled it?

                                            – dor506
                                            Mar 7 '17 at 12:40








                                          • 3





                                            looks like my problem is because of renderscript too, but what if i need renderscript for something else, not for customtabs?

                                            – HendraWD
                                            Mar 13 '17 at 8:38














                                          • 2





                                            I had the exact same problem after updating to Android Studio 2.3

                                            – Plugie
                                            Mar 4 '17 at 11:11






                                          • 1





                                            For anyone using RenderScript, I set renderscriptSupportModeEnabled false this to false. And added compile 'com.android.support:customtabs:25.2.0' and error went away.

                                            – Law Gimenez
                                            Mar 6 '17 at 9:15








                                          • 1





                                            @LawGimenez And how should we use renderscript if we just disabled it?

                                            – dor506
                                            Mar 7 '17 at 12:40








                                          • 3





                                            looks like my problem is because of renderscript too, but what if i need renderscript for something else, not for customtabs?

                                            – HendraWD
                                            Mar 13 '17 at 8:38








                                          2




                                          2





                                          I had the exact same problem after updating to Android Studio 2.3

                                          – Plugie
                                          Mar 4 '17 at 11:11





                                          I had the exact same problem after updating to Android Studio 2.3

                                          – Plugie
                                          Mar 4 '17 at 11:11




                                          1




                                          1





                                          For anyone using RenderScript, I set renderscriptSupportModeEnabled false this to false. And added compile 'com.android.support:customtabs:25.2.0' and error went away.

                                          – Law Gimenez
                                          Mar 6 '17 at 9:15







                                          For anyone using RenderScript, I set renderscriptSupportModeEnabled false this to false. And added compile 'com.android.support:customtabs:25.2.0' and error went away.

                                          – Law Gimenez
                                          Mar 6 '17 at 9:15






                                          1




                                          1





                                          @LawGimenez And how should we use renderscript if we just disabled it?

                                          – dor506
                                          Mar 7 '17 at 12:40







                                          @LawGimenez And how should we use renderscript if we just disabled it?

                                          – dor506
                                          Mar 7 '17 at 12:40






                                          3




                                          3





                                          looks like my problem is because of renderscript too, but what if i need renderscript for something else, not for customtabs?

                                          – HendraWD
                                          Mar 13 '17 at 8:38





                                          looks like my problem is because of renderscript too, but what if i need renderscript for something else, not for customtabs?

                                          – HendraWD
                                          Mar 13 '17 at 8:38











                                          44














                                          A) Run gradle dependencies or ./gradlew dependencies



                                          B) Look at your tree and figure out which of your dependencies is specifying a different support library version for a dependency you don't control.



                                          I didn't realize that this warning also displays if the dependency is completely unused directly by your own code. In my case, Facebook specifies some support libs I wasn't using, you can see below most of those dependencies were overridden by my own specification of 25.2.0, denoted by the -> X.X.X (*) symbols. The card view and custom tabs libs weren't overridden by anyone, so I need to ask for 25.2.0 for those ones myself even though I don't use them.



                                          +--- com.facebook.android:facebook-android-sdk:4.17.0
                                          | +--- com.android.support:support-v4:25.0.0 -> 25.2.0 (*)
                                          | +--- com.android.support:appcompat-v7:25.0.0 -> 25.2.0 (*)
                                          | +--- com.android.support:cardview-v7:25.0.0
                                          | | --- com.android.support:support-annotations:25.0.0 -> 25.2.0
                                          | +--- com.android.support:customtabs:25.0.0
                                          | | +--- com.android.support:support-compat:25.0.0 -> 25.2.0 (*)
                                          | | --- com.android.support:support-annotations:25.0.0 -> 25.2.0
                                          | --- com.parse.bolts:bolts-android:1.4.0 (*)


                                          If gradle has already warned you and given you examples...




                                          Examples include com.android.support:animated-vector-drawable:25.1.1
                                          and com.android.support:mediarouter-v7:24.0.0




                                          ... it's even easier if you throw in some grep highlighting for the lower version since gradle dependencies can be quite verbose:



                                          ./gradlew dependencies | grep --color -E 'com.android.support:mediarouter-v7|$'





                                          share|improve this answer





















                                          • 1





                                            From your explanation I understand that X.X.X -> Y.Y.Y (*) means that X.X.X is overridden by Y.Y.Y, that is good to know

                                            – Mercury
                                            Apr 30 '17 at 22:11











                                          • Literally the only valid answer.

                                            – stef
                                            Feb 23 '18 at 17:28
















                                          44














                                          A) Run gradle dependencies or ./gradlew dependencies



                                          B) Look at your tree and figure out which of your dependencies is specifying a different support library version for a dependency you don't control.



                                          I didn't realize that this warning also displays if the dependency is completely unused directly by your own code. In my case, Facebook specifies some support libs I wasn't using, you can see below most of those dependencies were overridden by my own specification of 25.2.0, denoted by the -> X.X.X (*) symbols. The card view and custom tabs libs weren't overridden by anyone, so I need to ask for 25.2.0 for those ones myself even though I don't use them.



                                          +--- com.facebook.android:facebook-android-sdk:4.17.0
                                          | +--- com.android.support:support-v4:25.0.0 -> 25.2.0 (*)
                                          | +--- com.android.support:appcompat-v7:25.0.0 -> 25.2.0 (*)
                                          | +--- com.android.support:cardview-v7:25.0.0
                                          | | --- com.android.support:support-annotations:25.0.0 -> 25.2.0
                                          | +--- com.android.support:customtabs:25.0.0
                                          | | +--- com.android.support:support-compat:25.0.0 -> 25.2.0 (*)
                                          | | --- com.android.support:support-annotations:25.0.0 -> 25.2.0
                                          | --- com.parse.bolts:bolts-android:1.4.0 (*)


                                          If gradle has already warned you and given you examples...




                                          Examples include com.android.support:animated-vector-drawable:25.1.1
                                          and com.android.support:mediarouter-v7:24.0.0




                                          ... it's even easier if you throw in some grep highlighting for the lower version since gradle dependencies can be quite verbose:



                                          ./gradlew dependencies | grep --color -E 'com.android.support:mediarouter-v7|$'





                                          share|improve this answer





















                                          • 1





                                            From your explanation I understand that X.X.X -> Y.Y.Y (*) means that X.X.X is overridden by Y.Y.Y, that is good to know

                                            – Mercury
                                            Apr 30 '17 at 22:11











                                          • Literally the only valid answer.

                                            – stef
                                            Feb 23 '18 at 17:28














                                          44












                                          44








                                          44







                                          A) Run gradle dependencies or ./gradlew dependencies



                                          B) Look at your tree and figure out which of your dependencies is specifying a different support library version for a dependency you don't control.



                                          I didn't realize that this warning also displays if the dependency is completely unused directly by your own code. In my case, Facebook specifies some support libs I wasn't using, you can see below most of those dependencies were overridden by my own specification of 25.2.0, denoted by the -> X.X.X (*) symbols. The card view and custom tabs libs weren't overridden by anyone, so I need to ask for 25.2.0 for those ones myself even though I don't use them.



                                          +--- com.facebook.android:facebook-android-sdk:4.17.0
                                          | +--- com.android.support:support-v4:25.0.0 -> 25.2.0 (*)
                                          | +--- com.android.support:appcompat-v7:25.0.0 -> 25.2.0 (*)
                                          | +--- com.android.support:cardview-v7:25.0.0
                                          | | --- com.android.support:support-annotations:25.0.0 -> 25.2.0
                                          | +--- com.android.support:customtabs:25.0.0
                                          | | +--- com.android.support:support-compat:25.0.0 -> 25.2.0 (*)
                                          | | --- com.android.support:support-annotations:25.0.0 -> 25.2.0
                                          | --- com.parse.bolts:bolts-android:1.4.0 (*)


                                          If gradle has already warned you and given you examples...




                                          Examples include com.android.support:animated-vector-drawable:25.1.1
                                          and com.android.support:mediarouter-v7:24.0.0




                                          ... it's even easier if you throw in some grep highlighting for the lower version since gradle dependencies can be quite verbose:



                                          ./gradlew dependencies | grep --color -E 'com.android.support:mediarouter-v7|$'





                                          share|improve this answer















                                          A) Run gradle dependencies or ./gradlew dependencies



                                          B) Look at your tree and figure out which of your dependencies is specifying a different support library version for a dependency you don't control.



                                          I didn't realize that this warning also displays if the dependency is completely unused directly by your own code. In my case, Facebook specifies some support libs I wasn't using, you can see below most of those dependencies were overridden by my own specification of 25.2.0, denoted by the -> X.X.X (*) symbols. The card view and custom tabs libs weren't overridden by anyone, so I need to ask for 25.2.0 for those ones myself even though I don't use them.



                                          +--- com.facebook.android:facebook-android-sdk:4.17.0
                                          | +--- com.android.support:support-v4:25.0.0 -> 25.2.0 (*)
                                          | +--- com.android.support:appcompat-v7:25.0.0 -> 25.2.0 (*)
                                          | +--- com.android.support:cardview-v7:25.0.0
                                          | | --- com.android.support:support-annotations:25.0.0 -> 25.2.0
                                          | +--- com.android.support:customtabs:25.0.0
                                          | | +--- com.android.support:support-compat:25.0.0 -> 25.2.0 (*)
                                          | | --- com.android.support:support-annotations:25.0.0 -> 25.2.0
                                          | --- com.parse.bolts:bolts-android:1.4.0 (*)


                                          If gradle has already warned you and given you examples...




                                          Examples include com.android.support:animated-vector-drawable:25.1.1
                                          and com.android.support:mediarouter-v7:24.0.0




                                          ... it's even easier if you throw in some grep highlighting for the lower version since gradle dependencies can be quite verbose:



                                          ./gradlew dependencies | grep --color -E 'com.android.support:mediarouter-v7|$'






                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited May 30 '18 at 19:13









                                          tir38

                                          4,21523262




                                          4,21523262










                                          answered Mar 10 '17 at 23:25









                                          Daniel WilsonDaniel Wilson

                                          8,47985273




                                          8,47985273








                                          • 1





                                            From your explanation I understand that X.X.X -> Y.Y.Y (*) means that X.X.X is overridden by Y.Y.Y, that is good to know

                                            – Mercury
                                            Apr 30 '17 at 22:11











                                          • Literally the only valid answer.

                                            – stef
                                            Feb 23 '18 at 17:28














                                          • 1





                                            From your explanation I understand that X.X.X -> Y.Y.Y (*) means that X.X.X is overridden by Y.Y.Y, that is good to know

                                            – Mercury
                                            Apr 30 '17 at 22:11











                                          • Literally the only valid answer.

                                            – stef
                                            Feb 23 '18 at 17:28








                                          1




                                          1





                                          From your explanation I understand that X.X.X -> Y.Y.Y (*) means that X.X.X is overridden by Y.Y.Y, that is good to know

                                          – Mercury
                                          Apr 30 '17 at 22:11





                                          From your explanation I understand that X.X.X -> Y.Y.Y (*) means that X.X.X is overridden by Y.Y.Y, that is good to know

                                          – Mercury
                                          Apr 30 '17 at 22:11













                                          Literally the only valid answer.

                                          – stef
                                          Feb 23 '18 at 17:28





                                          Literally the only valid answer.

                                          – stef
                                          Feb 23 '18 at 17:28











                                          31














                                          Use variables: Doing something like the following will make it easier for you to ensure that you use the same version with all libraries



                                          dependencies {

                                          ext {
                                          support_library_version = '25.2.0'
                                          google_play_services_version = '10.2.0'
                                          }

                                          //#####################################################################
                                          // Support Library
                                          //#####################################################################
                                          compile "com.android.support:appcompat-v7:${support_library_version}"
                                          compile "com.android.support:palette-v7:${support_library_version}"
                                          compile "com.android.support:design:${support_library_version}"

                                          //#####################################################################
                                          // Google Play Services
                                          //#####################################################################
                                          compile "com.google.android.gms:play-services-auth:${google_play_services_version}"
                                          compile "com.google.android.gms:play-services-ads:${google_play_services_version}"
                                          compile "com.google.android.gms:play-services-analytics:${google_play_services_version}"

                                          //#####################################################################
                                          // Firebase
                                          //#####################################################################
                                          compile "com.google.firebase:firebase-core:${google_play_services_version}"
                                          compile "com.google.firebase:firebase-auth:${google_play_services_version}"
                                          compile "com.google.firebase:firebase-messaging:${google_play_services_version}"


                                          More information on how Google suggests that you handle this versioning can be found in this article: https://developer.android.com/studio/build/index.html#top-level






                                          share|improve this answer


























                                          • thanks Dear Daniel F, I think this is the best way to avoid the version mixing problem.

                                            – Hovanes Mosoyan
                                            Apr 14 '18 at 10:33






                                          • 2





                                            Only one note please: As suggested in the link above, we should define this type variables in the TOP LEVEL GRADLE FILE thanks again)

                                            – Hovanes Mosoyan
                                            Apr 14 '18 at 10:49


















                                          31














                                          Use variables: Doing something like the following will make it easier for you to ensure that you use the same version with all libraries



                                          dependencies {

                                          ext {
                                          support_library_version = '25.2.0'
                                          google_play_services_version = '10.2.0'
                                          }

                                          //#####################################################################
                                          // Support Library
                                          //#####################################################################
                                          compile "com.android.support:appcompat-v7:${support_library_version}"
                                          compile "com.android.support:palette-v7:${support_library_version}"
                                          compile "com.android.support:design:${support_library_version}"

                                          //#####################################################################
                                          // Google Play Services
                                          //#####################################################################
                                          compile "com.google.android.gms:play-services-auth:${google_play_services_version}"
                                          compile "com.google.android.gms:play-services-ads:${google_play_services_version}"
                                          compile "com.google.android.gms:play-services-analytics:${google_play_services_version}"

                                          //#####################################################################
                                          // Firebase
                                          //#####################################################################
                                          compile "com.google.firebase:firebase-core:${google_play_services_version}"
                                          compile "com.google.firebase:firebase-auth:${google_play_services_version}"
                                          compile "com.google.firebase:firebase-messaging:${google_play_services_version}"


                                          More information on how Google suggests that you handle this versioning can be found in this article: https://developer.android.com/studio/build/index.html#top-level






                                          share|improve this answer


























                                          • thanks Dear Daniel F, I think this is the best way to avoid the version mixing problem.

                                            – Hovanes Mosoyan
                                            Apr 14 '18 at 10:33






                                          • 2





                                            Only one note please: As suggested in the link above, we should define this type variables in the TOP LEVEL GRADLE FILE thanks again)

                                            – Hovanes Mosoyan
                                            Apr 14 '18 at 10:49
















                                          31












                                          31








                                          31







                                          Use variables: Doing something like the following will make it easier for you to ensure that you use the same version with all libraries



                                          dependencies {

                                          ext {
                                          support_library_version = '25.2.0'
                                          google_play_services_version = '10.2.0'
                                          }

                                          //#####################################################################
                                          // Support Library
                                          //#####################################################################
                                          compile "com.android.support:appcompat-v7:${support_library_version}"
                                          compile "com.android.support:palette-v7:${support_library_version}"
                                          compile "com.android.support:design:${support_library_version}"

                                          //#####################################################################
                                          // Google Play Services
                                          //#####################################################################
                                          compile "com.google.android.gms:play-services-auth:${google_play_services_version}"
                                          compile "com.google.android.gms:play-services-ads:${google_play_services_version}"
                                          compile "com.google.android.gms:play-services-analytics:${google_play_services_version}"

                                          //#####################################################################
                                          // Firebase
                                          //#####################################################################
                                          compile "com.google.firebase:firebase-core:${google_play_services_version}"
                                          compile "com.google.firebase:firebase-auth:${google_play_services_version}"
                                          compile "com.google.firebase:firebase-messaging:${google_play_services_version}"


                                          More information on how Google suggests that you handle this versioning can be found in this article: https://developer.android.com/studio/build/index.html#top-level






                                          share|improve this answer















                                          Use variables: Doing something like the following will make it easier for you to ensure that you use the same version with all libraries



                                          dependencies {

                                          ext {
                                          support_library_version = '25.2.0'
                                          google_play_services_version = '10.2.0'
                                          }

                                          //#####################################################################
                                          // Support Library
                                          //#####################################################################
                                          compile "com.android.support:appcompat-v7:${support_library_version}"
                                          compile "com.android.support:palette-v7:${support_library_version}"
                                          compile "com.android.support:design:${support_library_version}"

                                          //#####################################################################
                                          // Google Play Services
                                          //#####################################################################
                                          compile "com.google.android.gms:play-services-auth:${google_play_services_version}"
                                          compile "com.google.android.gms:play-services-ads:${google_play_services_version}"
                                          compile "com.google.android.gms:play-services-analytics:${google_play_services_version}"

                                          //#####################################################################
                                          // Firebase
                                          //#####################################################################
                                          compile "com.google.firebase:firebase-core:${google_play_services_version}"
                                          compile "com.google.firebase:firebase-auth:${google_play_services_version}"
                                          compile "com.google.firebase:firebase-messaging:${google_play_services_version}"


                                          More information on how Google suggests that you handle this versioning can be found in this article: https://developer.android.com/studio/build/index.html#top-level







                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited Apr 13 '18 at 23:28

























                                          answered Mar 22 '17 at 18:36









                                          Daniel FDaniel F

                                          6,59345067




                                          6,59345067













                                          • thanks Dear Daniel F, I think this is the best way to avoid the version mixing problem.

                                            – Hovanes Mosoyan
                                            Apr 14 '18 at 10:33






                                          • 2





                                            Only one note please: As suggested in the link above, we should define this type variables in the TOP LEVEL GRADLE FILE thanks again)

                                            – Hovanes Mosoyan
                                            Apr 14 '18 at 10:49





















                                          • thanks Dear Daniel F, I think this is the best way to avoid the version mixing problem.

                                            – Hovanes Mosoyan
                                            Apr 14 '18 at 10:33






                                          • 2





                                            Only one note please: As suggested in the link above, we should define this type variables in the TOP LEVEL GRADLE FILE thanks again)

                                            – Hovanes Mosoyan
                                            Apr 14 '18 at 10:49



















                                          thanks Dear Daniel F, I think this is the best way to avoid the version mixing problem.

                                          – Hovanes Mosoyan
                                          Apr 14 '18 at 10:33





                                          thanks Dear Daniel F, I think this is the best way to avoid the version mixing problem.

                                          – Hovanes Mosoyan
                                          Apr 14 '18 at 10:33




                                          2




                                          2





                                          Only one note please: As suggested in the link above, we should define this type variables in the TOP LEVEL GRADLE FILE thanks again)

                                          – Hovanes Mosoyan
                                          Apr 14 '18 at 10:49







                                          Only one note please: As suggested in the link above, we should define this type variables in the TOP LEVEL GRADLE FILE thanks again)

                                          – Hovanes Mosoyan
                                          Apr 14 '18 at 10:49













                                          25














                                          I just add this :



                                          compile 'com.android.support:mediarouter-v7:25.2.0'


                                          Updated for new SDK versions



                                          compile 'com.android.support:mediarouter-v7:28.0.0-alpha3'





                                          share|improve this answer


























                                          • It doesn't solve a problem that old library contains old SDK.

                                            – CoolMind
                                            Sep 27 '18 at 13:54
















                                          25














                                          I just add this :



                                          compile 'com.android.support:mediarouter-v7:25.2.0'


                                          Updated for new SDK versions



                                          compile 'com.android.support:mediarouter-v7:28.0.0-alpha3'





                                          share|improve this answer


























                                          • It doesn't solve a problem that old library contains old SDK.

                                            – CoolMind
                                            Sep 27 '18 at 13:54














                                          25












                                          25








                                          25







                                          I just add this :



                                          compile 'com.android.support:mediarouter-v7:25.2.0'


                                          Updated for new SDK versions



                                          compile 'com.android.support:mediarouter-v7:28.0.0-alpha3'





                                          share|improve this answer















                                          I just add this :



                                          compile 'com.android.support:mediarouter-v7:25.2.0'


                                          Updated for new SDK versions



                                          compile 'com.android.support:mediarouter-v7:28.0.0-alpha3'






                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited Jul 13 '18 at 7:23

























                                          answered Mar 8 '17 at 19:35









                                          Mohsen mokhtariMohsen mokhtari

                                          1,3281125




                                          1,3281125













                                          • It doesn't solve a problem that old library contains old SDK.

                                            – CoolMind
                                            Sep 27 '18 at 13:54



















                                          • It doesn't solve a problem that old library contains old SDK.

                                            – CoolMind
                                            Sep 27 '18 at 13:54

















                                          It doesn't solve a problem that old library contains old SDK.

                                          – CoolMind
                                          Sep 27 '18 at 13:54





                                          It doesn't solve a problem that old library contains old SDK.

                                          – CoolMind
                                          Sep 27 '18 at 13:54











                                          19














                                          If the same error is on appcompat



                                          implementation 'com.android.support:appcompat-v7:27.0.1'


                                          then adding design solved it.



                                          implementation 'com.android.support:appcompat-v7:27.0.1'
                                          implementation 'com.android.support:design:27.0.1'


                                          For me, adding



                                          implementation 'de.mrmaffen:vlc-android-sdk:2.0.6'


                                          was including appcompat-v7:23.1.1 in




                                          .idea/libraries




                                          without vlc, appcompat alone is enough.






                                          share|improve this answer


























                                          • Many thanks, it worked, but what is the role of 'com.android.support:design:27.0.1'

                                            – Wessam El Mahdy
                                            May 25 '18 at 8:02
















                                          19














                                          If the same error is on appcompat



                                          implementation 'com.android.support:appcompat-v7:27.0.1'


                                          then adding design solved it.



                                          implementation 'com.android.support:appcompat-v7:27.0.1'
                                          implementation 'com.android.support:design:27.0.1'


                                          For me, adding



                                          implementation 'de.mrmaffen:vlc-android-sdk:2.0.6'


                                          was including appcompat-v7:23.1.1 in




                                          .idea/libraries




                                          without vlc, appcompat alone is enough.






                                          share|improve this answer


























                                          • Many thanks, it worked, but what is the role of 'com.android.support:design:27.0.1'

                                            – Wessam El Mahdy
                                            May 25 '18 at 8:02














                                          19












                                          19








                                          19







                                          If the same error is on appcompat



                                          implementation 'com.android.support:appcompat-v7:27.0.1'


                                          then adding design solved it.



                                          implementation 'com.android.support:appcompat-v7:27.0.1'
                                          implementation 'com.android.support:design:27.0.1'


                                          For me, adding



                                          implementation 'de.mrmaffen:vlc-android-sdk:2.0.6'


                                          was including appcompat-v7:23.1.1 in




                                          .idea/libraries




                                          without vlc, appcompat alone is enough.






                                          share|improve this answer















                                          If the same error is on appcompat



                                          implementation 'com.android.support:appcompat-v7:27.0.1'


                                          then adding design solved it.



                                          implementation 'com.android.support:appcompat-v7:27.0.1'
                                          implementation 'com.android.support:design:27.0.1'


                                          For me, adding



                                          implementation 'de.mrmaffen:vlc-android-sdk:2.0.6'


                                          was including appcompat-v7:23.1.1 in




                                          .idea/libraries




                                          without vlc, appcompat alone is enough.







                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited Dec 6 '17 at 8:36

























                                          answered Dec 6 '17 at 8:28









                                          PrabsPrabs

                                          2,03122442




                                          2,03122442













                                          • Many thanks, it worked, but what is the role of 'com.android.support:design:27.0.1'

                                            – Wessam El Mahdy
                                            May 25 '18 at 8:02



















                                          • Many thanks, it worked, but what is the role of 'com.android.support:design:27.0.1'

                                            – Wessam El Mahdy
                                            May 25 '18 at 8:02

















                                          Many thanks, it worked, but what is the role of 'com.android.support:design:27.0.1'

                                          – Wessam El Mahdy
                                          May 25 '18 at 8:02





                                          Many thanks, it worked, but what is the role of 'com.android.support:design:27.0.1'

                                          – Wessam El Mahdy
                                          May 25 '18 at 8:02











                                          17














                                          As you already seen the all answers and comments above but this answer is to clear something which a new developer might not get easily.



                                          ./gradlew -q dependencies app:dependencies --configuration compile



                                          The above line will save your life with no doubt but how to get the exact point from the result of above line.



                                          When you get the all dependency chart or list from the above command then you have to search the conflicting version number which you are getting in your code. please see the below image.



                                          enter image description here



                                          in the above image you can see that 23.4.0 is creating the problem but this we not able to find in our gradle file. So now this version number(23.4.0) will save us. When we have this number then we will find this number in the result of above command result and directly import that dependency directly in our gradle file. Please see the below image to get the clear view.





                                          you can clearly see that com.android.support:cardview-v7:23.4.0 and com.android.support:customtabs:23.4.0 are using the version which is creating the problem. Now just simply copy those line from dependency
                                          list and explicitly use in our gradle file but with the updated version link



                                          implementation "com.android.support:cardview-v7:26.1.0"
                                          implementation "com.android.support:customtabs:26.1.0"






                                          share|improve this answer



















                                          • 1





                                            Thank you! With newer versions of android studio, it should be switched to implementation instead of compile

                                            – Avi Parshan
                                            Apr 2 '18 at 9:09











                                          • Yes you are right @AviParshan we can use compile or api. Dependencies appearing in the api configurations will be transitively exposed to consumers of the library, and as such will appear on the compile classpath of consumers. Dependencies found in the implementation configuration will, on the other hand, not be exposed to consumers, and therefore not leak into the consumers' compile classpath.

                                            – anoopbryan2
                                            Apr 2 '18 at 11:27













                                          • use ./gradlew -q dependencies app:dependencies --configuration implementation

                                            – Sumit
                                            Feb 15 at 7:45
















                                          17














                                          As you already seen the all answers and comments above but this answer is to clear something which a new developer might not get easily.



                                          ./gradlew -q dependencies app:dependencies --configuration compile



                                          The above line will save your life with no doubt but how to get the exact point from the result of above line.



                                          When you get the all dependency chart or list from the above command then you have to search the conflicting version number which you are getting in your code. please see the below image.



                                          enter image description here



                                          in the above image you can see that 23.4.0 is creating the problem but this we not able to find in our gradle file. So now this version number(23.4.0) will save us. When we have this number then we will find this number in the result of above command result and directly import that dependency directly in our gradle file. Please see the below image to get the clear view.





                                          you can clearly see that com.android.support:cardview-v7:23.4.0 and com.android.support:customtabs:23.4.0 are using the version which is creating the problem. Now just simply copy those line from dependency
                                          list and explicitly use in our gradle file but with the updated version link



                                          implementation "com.android.support:cardview-v7:26.1.0"
                                          implementation "com.android.support:customtabs:26.1.0"






                                          share|improve this answer



















                                          • 1





                                            Thank you! With newer versions of android studio, it should be switched to implementation instead of compile

                                            – Avi Parshan
                                            Apr 2 '18 at 9:09











                                          • Yes you are right @AviParshan we can use compile or api. Dependencies appearing in the api configurations will be transitively exposed to consumers of the library, and as such will appear on the compile classpath of consumers. Dependencies found in the implementation configuration will, on the other hand, not be exposed to consumers, and therefore not leak into the consumers' compile classpath.

                                            – anoopbryan2
                                            Apr 2 '18 at 11:27













                                          • use ./gradlew -q dependencies app:dependencies --configuration implementation

                                            – Sumit
                                            Feb 15 at 7:45














                                          17












                                          17








                                          17







                                          As you already seen the all answers and comments above but this answer is to clear something which a new developer might not get easily.



                                          ./gradlew -q dependencies app:dependencies --configuration compile



                                          The above line will save your life with no doubt but how to get the exact point from the result of above line.



                                          When you get the all dependency chart or list from the above command then you have to search the conflicting version number which you are getting in your code. please see the below image.



                                          enter image description here



                                          in the above image you can see that 23.4.0 is creating the problem but this we not able to find in our gradle file. So now this version number(23.4.0) will save us. When we have this number then we will find this number in the result of above command result and directly import that dependency directly in our gradle file. Please see the below image to get the clear view.





                                          you can clearly see that com.android.support:cardview-v7:23.4.0 and com.android.support:customtabs:23.4.0 are using the version which is creating the problem. Now just simply copy those line from dependency
                                          list and explicitly use in our gradle file but with the updated version link



                                          implementation "com.android.support:cardview-v7:26.1.0"
                                          implementation "com.android.support:customtabs:26.1.0"






                                          share|improve this answer













                                          As you already seen the all answers and comments above but this answer is to clear something which a new developer might not get easily.



                                          ./gradlew -q dependencies app:dependencies --configuration compile



                                          The above line will save your life with no doubt but how to get the exact point from the result of above line.



                                          When you get the all dependency chart or list from the above command then you have to search the conflicting version number which you are getting in your code. please see the below image.



                                          enter image description here



                                          in the above image you can see that 23.4.0 is creating the problem but this we not able to find in our gradle file. So now this version number(23.4.0) will save us. When we have this number then we will find this number in the result of above command result and directly import that dependency directly in our gradle file. Please see the below image to get the clear view.





                                          you can clearly see that com.android.support:cardview-v7:23.4.0 and com.android.support:customtabs:23.4.0 are using the version which is creating the problem. Now just simply copy those line from dependency
                                          list and explicitly use in our gradle file but with the updated version link



                                          implementation "com.android.support:cardview-v7:26.1.0"
                                          implementation "com.android.support:customtabs:26.1.0"







                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Mar 8 '18 at 9:05









                                          anoopbryan2anoopbryan2

                                          486613




                                          486613








                                          • 1





                                            Thank you! With newer versions of android studio, it should be switched to implementation instead of compile

                                            – Avi Parshan
                                            Apr 2 '18 at 9:09











                                          • Yes you are right @AviParshan we can use compile or api. Dependencies appearing in the api configurations will be transitively exposed to consumers of the library, and as such will appear on the compile classpath of consumers. Dependencies found in the implementation configuration will, on the other hand, not be exposed to consumers, and therefore not leak into the consumers' compile classpath.

                                            – anoopbryan2
                                            Apr 2 '18 at 11:27













                                          • use ./gradlew -q dependencies app:dependencies --configuration implementation

                                            – Sumit
                                            Feb 15 at 7:45














                                          • 1





                                            Thank you! With newer versions of android studio, it should be switched to implementation instead of compile

                                            – Avi Parshan
                                            Apr 2 '18 at 9:09











                                          • Yes you are right @AviParshan we can use compile or api. Dependencies appearing in the api configurations will be transitively exposed to consumers of the library, and as such will appear on the compile classpath of consumers. Dependencies found in the implementation configuration will, on the other hand, not be exposed to consumers, and therefore not leak into the consumers' compile classpath.

                                            – anoopbryan2
                                            Apr 2 '18 at 11:27













                                          • use ./gradlew -q dependencies app:dependencies --configuration implementation

                                            – Sumit
                                            Feb 15 at 7:45








                                          1




                                          1





                                          Thank you! With newer versions of android studio, it should be switched to implementation instead of compile

                                          – Avi Parshan
                                          Apr 2 '18 at 9:09





                                          Thank you! With newer versions of android studio, it should be switched to implementation instead of compile

                                          – Avi Parshan
                                          Apr 2 '18 at 9:09













                                          Yes you are right @AviParshan we can use compile or api. Dependencies appearing in the api configurations will be transitively exposed to consumers of the library, and as such will appear on the compile classpath of consumers. Dependencies found in the implementation configuration will, on the other hand, not be exposed to consumers, and therefore not leak into the consumers' compile classpath.

                                          – anoopbryan2
                                          Apr 2 '18 at 11:27







                                          Yes you are right @AviParshan we can use compile or api. Dependencies appearing in the api configurations will be transitively exposed to consumers of the library, and as such will appear on the compile classpath of consumers. Dependencies found in the implementation configuration will, on the other hand, not be exposed to consumers, and therefore not leak into the consumers' compile classpath.

                                          – anoopbryan2
                                          Apr 2 '18 at 11:27















                                          use ./gradlew -q dependencies app:dependencies --configuration implementation

                                          – Sumit
                                          Feb 15 at 7:45





                                          use ./gradlew -q dependencies app:dependencies --configuration implementation

                                          – Sumit
                                          Feb 15 at 7:45











                                          13














                                          Another way to solve conflicts is just to force the correct version for all dependencies like this:



                                          dependencies {
                                          configurations.all {
                                          resolutionStrategy.eachDependency { DependencyResolveDetails details ->
                                          if (details.requested.group == 'com.android.support' && details.requested.name == 'support-v4') {
                                          details.useVersion "27.0.2"
                                          }
                                          }
                                          ...
                                          }


                                          https://docs.gradle.org/current/userguide/customizing_dependency_resolution_behavior.html






                                          share|improve this answer




























                                            13














                                            Another way to solve conflicts is just to force the correct version for all dependencies like this:



                                            dependencies {
                                            configurations.all {
                                            resolutionStrategy.eachDependency { DependencyResolveDetails details ->
                                            if (details.requested.group == 'com.android.support' && details.requested.name == 'support-v4') {
                                            details.useVersion "27.0.2"
                                            }
                                            }
                                            ...
                                            }


                                            https://docs.gradle.org/current/userguide/customizing_dependency_resolution_behavior.html






                                            share|improve this answer


























                                              13












                                              13








                                              13







                                              Another way to solve conflicts is just to force the correct version for all dependencies like this:



                                              dependencies {
                                              configurations.all {
                                              resolutionStrategy.eachDependency { DependencyResolveDetails details ->
                                              if (details.requested.group == 'com.android.support' && details.requested.name == 'support-v4') {
                                              details.useVersion "27.0.2"
                                              }
                                              }
                                              ...
                                              }


                                              https://docs.gradle.org/current/userguide/customizing_dependency_resolution_behavior.html






                                              share|improve this answer













                                              Another way to solve conflicts is just to force the correct version for all dependencies like this:



                                              dependencies {
                                              configurations.all {
                                              resolutionStrategy.eachDependency { DependencyResolveDetails details ->
                                              if (details.requested.group == 'com.android.support' && details.requested.name == 'support-v4') {
                                              details.useVersion "27.0.2"
                                              }
                                              }
                                              ...
                                              }


                                              https://docs.gradle.org/current/userguide/customizing_dependency_resolution_behavior.html







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Feb 3 '18 at 17:19









                                              GainderGainder

                                              16817




                                              16817























                                                  12














                                                  Use support-v13 instead of support-v4



                                                  compile 'com.android.support:support-v13:25.2.0'





                                                  share|improve this answer
























                                                  • I am getting problem with this:compile 'com.android.support:recyclerview-v7:25.2.0'

                                                    – Crime_Master_GoGo
                                                    Mar 14 '17 at 13:14













                                                  • @Googli please write error text.

                                                    – Mehmet Hanoğlu
                                                    Mar 14 '17 at 13:21











                                                  • Exact same error as above:-> all com.android.support libraries must use the exact same version specification Recyclerview

                                                    – Crime_Master_GoGo
                                                    Mar 14 '17 at 13:36













                                                  • @Googli, Please write compileSdkVersion, buildToolsVersion and dependencies I used this. No problem compile 'com.android.support:appcompat-v7:25.2.0' compile 'com.android.support:design:25.2.0' compile 'com.android.support:support-v13:25.2.0' compile 'com.android.support:recyclerview-v7:25.2.0'

                                                    – Mehmet Hanoğlu
                                                    Mar 14 '17 at 13:59


















                                                  12














                                                  Use support-v13 instead of support-v4



                                                  compile 'com.android.support:support-v13:25.2.0'





                                                  share|improve this answer
























                                                  • I am getting problem with this:compile 'com.android.support:recyclerview-v7:25.2.0'

                                                    – Crime_Master_GoGo
                                                    Mar 14 '17 at 13:14













                                                  • @Googli please write error text.

                                                    – Mehmet Hanoğlu
                                                    Mar 14 '17 at 13:21











                                                  • Exact same error as above:-> all com.android.support libraries must use the exact same version specification Recyclerview

                                                    – Crime_Master_GoGo
                                                    Mar 14 '17 at 13:36













                                                  • @Googli, Please write compileSdkVersion, buildToolsVersion and dependencies I used this. No problem compile 'com.android.support:appcompat-v7:25.2.0' compile 'com.android.support:design:25.2.0' compile 'com.android.support:support-v13:25.2.0' compile 'com.android.support:recyclerview-v7:25.2.0'

                                                    – Mehmet Hanoğlu
                                                    Mar 14 '17 at 13:59
















                                                  12












                                                  12








                                                  12







                                                  Use support-v13 instead of support-v4



                                                  compile 'com.android.support:support-v13:25.2.0'





                                                  share|improve this answer













                                                  Use support-v13 instead of support-v4



                                                  compile 'com.android.support:support-v13:25.2.0'






                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Mar 8 '17 at 12:21









                                                  Mehmet HanoğluMehmet Hanoğlu

                                                  541513




                                                  541513













                                                  • I am getting problem with this:compile 'com.android.support:recyclerview-v7:25.2.0'

                                                    – Crime_Master_GoGo
                                                    Mar 14 '17 at 13:14













                                                  • @Googli please write error text.

                                                    – Mehmet Hanoğlu
                                                    Mar 14 '17 at 13:21











                                                  • Exact same error as above:-> all com.android.support libraries must use the exact same version specification Recyclerview

                                                    – Crime_Master_GoGo
                                                    Mar 14 '17 at 13:36













                                                  • @Googli, Please write compileSdkVersion, buildToolsVersion and dependencies I used this. No problem compile 'com.android.support:appcompat-v7:25.2.0' compile 'com.android.support:design:25.2.0' compile 'com.android.support:support-v13:25.2.0' compile 'com.android.support:recyclerview-v7:25.2.0'

                                                    – Mehmet Hanoğlu
                                                    Mar 14 '17 at 13:59





















                                                  • I am getting problem with this:compile 'com.android.support:recyclerview-v7:25.2.0'

                                                    – Crime_Master_GoGo
                                                    Mar 14 '17 at 13:14













                                                  • @Googli please write error text.

                                                    – Mehmet Hanoğlu
                                                    Mar 14 '17 at 13:21











                                                  • Exact same error as above:-> all com.android.support libraries must use the exact same version specification Recyclerview

                                                    – Crime_Master_GoGo
                                                    Mar 14 '17 at 13:36













                                                  • @Googli, Please write compileSdkVersion, buildToolsVersion and dependencies I used this. No problem compile 'com.android.support:appcompat-v7:25.2.0' compile 'com.android.support:design:25.2.0' compile 'com.android.support:support-v13:25.2.0' compile 'com.android.support:recyclerview-v7:25.2.0'

                                                    – Mehmet Hanoğlu
                                                    Mar 14 '17 at 13:59



















                                                  I am getting problem with this:compile 'com.android.support:recyclerview-v7:25.2.0'

                                                  – Crime_Master_GoGo
                                                  Mar 14 '17 at 13:14







                                                  I am getting problem with this:compile 'com.android.support:recyclerview-v7:25.2.0'

                                                  – Crime_Master_GoGo
                                                  Mar 14 '17 at 13:14















                                                  @Googli please write error text.

                                                  – Mehmet Hanoğlu
                                                  Mar 14 '17 at 13:21





                                                  @Googli please write error text.

                                                  – Mehmet Hanoğlu
                                                  Mar 14 '17 at 13:21













                                                  Exact same error as above:-> all com.android.support libraries must use the exact same version specification Recyclerview

                                                  – Crime_Master_GoGo
                                                  Mar 14 '17 at 13:36







                                                  Exact same error as above:-> all com.android.support libraries must use the exact same version specification Recyclerview

                                                  – Crime_Master_GoGo
                                                  Mar 14 '17 at 13:36















                                                  @Googli, Please write compileSdkVersion, buildToolsVersion and dependencies I used this. No problem compile 'com.android.support:appcompat-v7:25.2.0' compile 'com.android.support:design:25.2.0' compile 'com.android.support:support-v13:25.2.0' compile 'com.android.support:recyclerview-v7:25.2.0'

                                                  – Mehmet Hanoğlu
                                                  Mar 14 '17 at 13:59







                                                  @Googli, Please write compileSdkVersion, buildToolsVersion and dependencies I used this. No problem compile 'com.android.support:appcompat-v7:25.2.0' compile 'com.android.support:design:25.2.0' compile 'com.android.support:support-v13:25.2.0' compile 'com.android.support:recyclerview-v7:25.2.0'

                                                  – Mehmet Hanoğlu
                                                  Mar 14 '17 at 13:59













                                                  9














                                                  My problem is similar to yours.
                                                  Here exist an error!



                                                  compile 'com.android.support:appcompat-v7:25.3.0'



                                                  All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.3.0, 24.0.0. Examples include 'com.android.support:animated-vector-drawable:25.3.0' and 'com.android.support:mediarouter-v7:24.0.0'



                                                  Seeing this
                                                  Examples include 'com.android.support:animated-vector-drawable:25.3.0' and 'com.android.support:mediarouter-v7:24.0.0'



                                                  the just add these codes in dependencies, make sure that versions are same.



                                                  compile 'com.android.support:animated-vector-drawable:25.3.0'
                                                  compile 'com.android.support:mediarouter-v7:25.3.0'





                                                  share|improve this answer




























                                                    9














                                                    My problem is similar to yours.
                                                    Here exist an error!



                                                    compile 'com.android.support:appcompat-v7:25.3.0'



                                                    All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.3.0, 24.0.0. Examples include 'com.android.support:animated-vector-drawable:25.3.0' and 'com.android.support:mediarouter-v7:24.0.0'



                                                    Seeing this
                                                    Examples include 'com.android.support:animated-vector-drawable:25.3.0' and 'com.android.support:mediarouter-v7:24.0.0'



                                                    the just add these codes in dependencies, make sure that versions are same.



                                                    compile 'com.android.support:animated-vector-drawable:25.3.0'
                                                    compile 'com.android.support:mediarouter-v7:25.3.0'





                                                    share|improve this answer


























                                                      9












                                                      9








                                                      9







                                                      My problem is similar to yours.
                                                      Here exist an error!



                                                      compile 'com.android.support:appcompat-v7:25.3.0'



                                                      All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.3.0, 24.0.0. Examples include 'com.android.support:animated-vector-drawable:25.3.0' and 'com.android.support:mediarouter-v7:24.0.0'



                                                      Seeing this
                                                      Examples include 'com.android.support:animated-vector-drawable:25.3.0' and 'com.android.support:mediarouter-v7:24.0.0'



                                                      the just add these codes in dependencies, make sure that versions are same.



                                                      compile 'com.android.support:animated-vector-drawable:25.3.0'
                                                      compile 'com.android.support:mediarouter-v7:25.3.0'





                                                      share|improve this answer













                                                      My problem is similar to yours.
                                                      Here exist an error!



                                                      compile 'com.android.support:appcompat-v7:25.3.0'



                                                      All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.3.0, 24.0.0. Examples include 'com.android.support:animated-vector-drawable:25.3.0' and 'com.android.support:mediarouter-v7:24.0.0'



                                                      Seeing this
                                                      Examples include 'com.android.support:animated-vector-drawable:25.3.0' and 'com.android.support:mediarouter-v7:24.0.0'



                                                      the just add these codes in dependencies, make sure that versions are same.



                                                      compile 'com.android.support:animated-vector-drawable:25.3.0'
                                                      compile 'com.android.support:mediarouter-v7:25.3.0'






                                                      share|improve this answer












                                                      share|improve this answer



                                                      share|improve this answer










                                                      answered Apr 20 '17 at 15:35









                                                      Yanbin HuYanbin Hu

                                                      416413




                                                      416413























                                                          9














                                                          I got the same error after adding compile 'com.google.android.gms:play-services:10.2.4' with compile 'com.android.support:appcompat-v7:25.3.1'.



                                                          Adding animated-vector-drawable and mediarouter libs fixed the issue.



                                                          compile 'com.google.android.gms:play-services:10.2.4'
                                                          compile 'com.android.support:appcompat-v7:25.3.1'
                                                          compile 'com.android.support:animated-vector-drawable:25.3.1'
                                                          compile 'com.android.support:mediarouter-v7:25.3.1'





                                                          share|improve this answer




























                                                            9














                                                            I got the same error after adding compile 'com.google.android.gms:play-services:10.2.4' with compile 'com.android.support:appcompat-v7:25.3.1'.



                                                            Adding animated-vector-drawable and mediarouter libs fixed the issue.



                                                            compile 'com.google.android.gms:play-services:10.2.4'
                                                            compile 'com.android.support:appcompat-v7:25.3.1'
                                                            compile 'com.android.support:animated-vector-drawable:25.3.1'
                                                            compile 'com.android.support:mediarouter-v7:25.3.1'





                                                            share|improve this answer


























                                                              9












                                                              9








                                                              9







                                                              I got the same error after adding compile 'com.google.android.gms:play-services:10.2.4' with compile 'com.android.support:appcompat-v7:25.3.1'.



                                                              Adding animated-vector-drawable and mediarouter libs fixed the issue.



                                                              compile 'com.google.android.gms:play-services:10.2.4'
                                                              compile 'com.android.support:appcompat-v7:25.3.1'
                                                              compile 'com.android.support:animated-vector-drawable:25.3.1'
                                                              compile 'com.android.support:mediarouter-v7:25.3.1'





                                                              share|improve this answer













                                                              I got the same error after adding compile 'com.google.android.gms:play-services:10.2.4' with compile 'com.android.support:appcompat-v7:25.3.1'.



                                                              Adding animated-vector-drawable and mediarouter libs fixed the issue.



                                                              compile 'com.google.android.gms:play-services:10.2.4'
                                                              compile 'com.android.support:appcompat-v7:25.3.1'
                                                              compile 'com.android.support:animated-vector-drawable:25.3.1'
                                                              compile 'com.android.support:mediarouter-v7:25.3.1'






                                                              share|improve this answer












                                                              share|improve this answer



                                                              share|improve this answer










                                                              answered May 12 '17 at 18:35









                                                              SandeepSandeep

                                                              11917




                                                              11917























                                                                  9














                                                                  I had this:



                                                                  dependencies {
                                                                  implementation fileTree(dir: 'libs', include: ['*.jar'])
                                                                  implementation 'com.android.support:appcompat-v7:27.1.1'
                                                                  implementation 'com.android.support:design:27.1.1'
                                                                  implementation 'com.android.support:support-v4:27.1.1'
                                                                  implementation 'com.google.firebase:firebase-auth:12.0.1'
                                                                  implementation 'com.google.firebase:firebase-firestore:12.0.1'
                                                                  implementation 'com.google.firebase:firebase-messaging:12.0.1'
                                                                  implementation 'com.google.android.gms:play-services-auth:12.0.1'
                                                                  implementation'com.facebook.android:facebook-login:[4,5)'
                                                                  implementation 'com.twitter.sdk.android:twitter:3.1.1'
                                                                  implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
                                                                  implementation 'org.jetbrains:annotations-java5:15.0'
                                                                  implementation project(':vehiclesapi')
                                                                  testImplementation 'junit:junit:4.12'
                                                                  androidTestImplementation 'com.android.support.test:runner:1.0.1'
                                                                  androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
                                                                  }


                                                                  and got this error:
                                                                  enter image description here



                                                                  The solutions was easy - the primary dependencies were all correct so the leaves however - any third party dependencies. Removed one by one until found the culprit, and turns out to be facebook! its using version 27.0.2 of the android support libraries. I tried to add the cardview version 27.1.1 but that didn't work eithern the solution was still simple enough.



                                                                  dependencies {
                                                                  implementation fileTree(dir: 'libs', include: ['*.jar'])
                                                                  implementation 'com.android.support:appcompat-v7:27.1.1'
                                                                  implementation 'com.android.support:design:27.1.1'
                                                                  implementation 'com.android.support:support-v4:27.1.1'
                                                                  implementation 'com.google.firebase:firebase-auth:12.0.1'
                                                                  implementation 'com.google.firebase:firebase-firestore:12.0.1'
                                                                  implementation 'com.google.firebase:firebase-messaging:12.0.1'
                                                                  implementation 'com.google.android.gms:play-services-auth:12.0.1'
                                                                  implementation('com.facebook.android:facebook-login:[4,5)'){
                                                                  // contains com.android.support:v7:27.0.2, included required com.android.support.*:27.1.1 modules
                                                                  exclude group: 'com.android.support'
                                                                  }
                                                                  implementation 'com.android.support:cardview-v7:27.1.1' // to replace facebook sdk's cardview-v7:27.0.2.
                                                                  implementation 'com.twitter.sdk.android:twitter:3.1.1'
                                                                  implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
                                                                  implementation 'org.jetbrains:annotations-java5:15.0'
                                                                  implementation project(':vehiclesapi')
                                                                  testImplementation 'junit:junit:4.12'
                                                                  androidTestImplementation 'com.android.support.test:runner:1.0.1'
                                                                  androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
                                                                  }





                                                                  share|improve this answer




























                                                                    9














                                                                    I had this:



                                                                    dependencies {
                                                                    implementation fileTree(dir: 'libs', include: ['*.jar'])
                                                                    implementation 'com.android.support:appcompat-v7:27.1.1'
                                                                    implementation 'com.android.support:design:27.1.1'
                                                                    implementation 'com.android.support:support-v4:27.1.1'
                                                                    implementation 'com.google.firebase:firebase-auth:12.0.1'
                                                                    implementation 'com.google.firebase:firebase-firestore:12.0.1'
                                                                    implementation 'com.google.firebase:firebase-messaging:12.0.1'
                                                                    implementation 'com.google.android.gms:play-services-auth:12.0.1'
                                                                    implementation'com.facebook.android:facebook-login:[4,5)'
                                                                    implementation 'com.twitter.sdk.android:twitter:3.1.1'
                                                                    implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
                                                                    implementation 'org.jetbrains:annotations-java5:15.0'
                                                                    implementation project(':vehiclesapi')
                                                                    testImplementation 'junit:junit:4.12'
                                                                    androidTestImplementation 'com.android.support.test:runner:1.0.1'
                                                                    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
                                                                    }


                                                                    and got this error:
                                                                    enter image description here



                                                                    The solutions was easy - the primary dependencies were all correct so the leaves however - any third party dependencies. Removed one by one until found the culprit, and turns out to be facebook! its using version 27.0.2 of the android support libraries. I tried to add the cardview version 27.1.1 but that didn't work eithern the solution was still simple enough.



                                                                    dependencies {
                                                                    implementation fileTree(dir: 'libs', include: ['*.jar'])
                                                                    implementation 'com.android.support:appcompat-v7:27.1.1'
                                                                    implementation 'com.android.support:design:27.1.1'
                                                                    implementation 'com.android.support:support-v4:27.1.1'
                                                                    implementation 'com.google.firebase:firebase-auth:12.0.1'
                                                                    implementation 'com.google.firebase:firebase-firestore:12.0.1'
                                                                    implementation 'com.google.firebase:firebase-messaging:12.0.1'
                                                                    implementation 'com.google.android.gms:play-services-auth:12.0.1'
                                                                    implementation('com.facebook.android:facebook-login:[4,5)'){
                                                                    // contains com.android.support:v7:27.0.2, included required com.android.support.*:27.1.1 modules
                                                                    exclude group: 'com.android.support'
                                                                    }
                                                                    implementation 'com.android.support:cardview-v7:27.1.1' // to replace facebook sdk's cardview-v7:27.0.2.
                                                                    implementation 'com.twitter.sdk.android:twitter:3.1.1'
                                                                    implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
                                                                    implementation 'org.jetbrains:annotations-java5:15.0'
                                                                    implementation project(':vehiclesapi')
                                                                    testImplementation 'junit:junit:4.12'
                                                                    androidTestImplementation 'com.android.support.test:runner:1.0.1'
                                                                    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
                                                                    }





                                                                    share|improve this answer


























                                                                      9












                                                                      9








                                                                      9







                                                                      I had this:



                                                                      dependencies {
                                                                      implementation fileTree(dir: 'libs', include: ['*.jar'])
                                                                      implementation 'com.android.support:appcompat-v7:27.1.1'
                                                                      implementation 'com.android.support:design:27.1.1'
                                                                      implementation 'com.android.support:support-v4:27.1.1'
                                                                      implementation 'com.google.firebase:firebase-auth:12.0.1'
                                                                      implementation 'com.google.firebase:firebase-firestore:12.0.1'
                                                                      implementation 'com.google.firebase:firebase-messaging:12.0.1'
                                                                      implementation 'com.google.android.gms:play-services-auth:12.0.1'
                                                                      implementation'com.facebook.android:facebook-login:[4,5)'
                                                                      implementation 'com.twitter.sdk.android:twitter:3.1.1'
                                                                      implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
                                                                      implementation 'org.jetbrains:annotations-java5:15.0'
                                                                      implementation project(':vehiclesapi')
                                                                      testImplementation 'junit:junit:4.12'
                                                                      androidTestImplementation 'com.android.support.test:runner:1.0.1'
                                                                      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
                                                                      }


                                                                      and got this error:
                                                                      enter image description here



                                                                      The solutions was easy - the primary dependencies were all correct so the leaves however - any third party dependencies. Removed one by one until found the culprit, and turns out to be facebook! its using version 27.0.2 of the android support libraries. I tried to add the cardview version 27.1.1 but that didn't work eithern the solution was still simple enough.



                                                                      dependencies {
                                                                      implementation fileTree(dir: 'libs', include: ['*.jar'])
                                                                      implementation 'com.android.support:appcompat-v7:27.1.1'
                                                                      implementation 'com.android.support:design:27.1.1'
                                                                      implementation 'com.android.support:support-v4:27.1.1'
                                                                      implementation 'com.google.firebase:firebase-auth:12.0.1'
                                                                      implementation 'com.google.firebase:firebase-firestore:12.0.1'
                                                                      implementation 'com.google.firebase:firebase-messaging:12.0.1'
                                                                      implementation 'com.google.android.gms:play-services-auth:12.0.1'
                                                                      implementation('com.facebook.android:facebook-login:[4,5)'){
                                                                      // contains com.android.support:v7:27.0.2, included required com.android.support.*:27.1.1 modules
                                                                      exclude group: 'com.android.support'
                                                                      }
                                                                      implementation 'com.android.support:cardview-v7:27.1.1' // to replace facebook sdk's cardview-v7:27.0.2.
                                                                      implementation 'com.twitter.sdk.android:twitter:3.1.1'
                                                                      implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
                                                                      implementation 'org.jetbrains:annotations-java5:15.0'
                                                                      implementation project(':vehiclesapi')
                                                                      testImplementation 'junit:junit:4.12'
                                                                      androidTestImplementation 'com.android.support.test:runner:1.0.1'
                                                                      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
                                                                      }





                                                                      share|improve this answer













                                                                      I had this:



                                                                      dependencies {
                                                                      implementation fileTree(dir: 'libs', include: ['*.jar'])
                                                                      implementation 'com.android.support:appcompat-v7:27.1.1'
                                                                      implementation 'com.android.support:design:27.1.1'
                                                                      implementation 'com.android.support:support-v4:27.1.1'
                                                                      implementation 'com.google.firebase:firebase-auth:12.0.1'
                                                                      implementation 'com.google.firebase:firebase-firestore:12.0.1'
                                                                      implementation 'com.google.firebase:firebase-messaging:12.0.1'
                                                                      implementation 'com.google.android.gms:play-services-auth:12.0.1'
                                                                      implementation'com.facebook.android:facebook-login:[4,5)'
                                                                      implementation 'com.twitter.sdk.android:twitter:3.1.1'
                                                                      implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
                                                                      implementation 'org.jetbrains:annotations-java5:15.0'
                                                                      implementation project(':vehiclesapi')
                                                                      testImplementation 'junit:junit:4.12'
                                                                      androidTestImplementation 'com.android.support.test:runner:1.0.1'
                                                                      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
                                                                      }


                                                                      and got this error:
                                                                      enter image description here



                                                                      The solutions was easy - the primary dependencies were all correct so the leaves however - any third party dependencies. Removed one by one until found the culprit, and turns out to be facebook! its using version 27.0.2 of the android support libraries. I tried to add the cardview version 27.1.1 but that didn't work eithern the solution was still simple enough.



                                                                      dependencies {
                                                                      implementation fileTree(dir: 'libs', include: ['*.jar'])
                                                                      implementation 'com.android.support:appcompat-v7:27.1.1'
                                                                      implementation 'com.android.support:design:27.1.1'
                                                                      implementation 'com.android.support:support-v4:27.1.1'
                                                                      implementation 'com.google.firebase:firebase-auth:12.0.1'
                                                                      implementation 'com.google.firebase:firebase-firestore:12.0.1'
                                                                      implementation 'com.google.firebase:firebase-messaging:12.0.1'
                                                                      implementation 'com.google.android.gms:play-services-auth:12.0.1'
                                                                      implementation('com.facebook.android:facebook-login:[4,5)'){
                                                                      // contains com.android.support:v7:27.0.2, included required com.android.support.*:27.1.1 modules
                                                                      exclude group: 'com.android.support'
                                                                      }
                                                                      implementation 'com.android.support:cardview-v7:27.1.1' // to replace facebook sdk's cardview-v7:27.0.2.
                                                                      implementation 'com.twitter.sdk.android:twitter:3.1.1'
                                                                      implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
                                                                      implementation 'org.jetbrains:annotations-java5:15.0'
                                                                      implementation project(':vehiclesapi')
                                                                      testImplementation 'junit:junit:4.12'
                                                                      androidTestImplementation 'com.android.support.test:runner:1.0.1'
                                                                      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
                                                                      }






                                                                      share|improve this answer












                                                                      share|improve this answer



                                                                      share|improve this answer










                                                                      answered Apr 12 '18 at 0:25









                                                                      AppLogics Solutions Ltd.AppLogics Solutions Ltd.

                                                                      30649




                                                                      30649























                                                                          8














                                                                          I used these two to solve my problem after upgrading to android studio 2.3



                                                                          compile 'com.android.support:animated-vector-drawable:25.0.0'
                                                                          compile 'com.android.support:mediarouter-v7:25.0.0'





                                                                          share|improve this answer




























                                                                            8














                                                                            I used these two to solve my problem after upgrading to android studio 2.3



                                                                            compile 'com.android.support:animated-vector-drawable:25.0.0'
                                                                            compile 'com.android.support:mediarouter-v7:25.0.0'





                                                                            share|improve this answer


























                                                                              8












                                                                              8








                                                                              8







                                                                              I used these two to solve my problem after upgrading to android studio 2.3



                                                                              compile 'com.android.support:animated-vector-drawable:25.0.0'
                                                                              compile 'com.android.support:mediarouter-v7:25.0.0'





                                                                              share|improve this answer













                                                                              I used these two to solve my problem after upgrading to android studio 2.3



                                                                              compile 'com.android.support:animated-vector-drawable:25.0.0'
                                                                              compile 'com.android.support:mediarouter-v7:25.0.0'






                                                                              share|improve this answer












                                                                              share|improve this answer



                                                                              share|improve this answer










                                                                              answered Mar 16 '17 at 7:03









                                                                              Aparajita SinhaAparajita Sinha

                                                                              386316




                                                                              386316























                                                                                  8














                                                                                  I had the same problem before and I got the solution for it.



                                                                                  I just added the libraries that had the another version but with the same version of my support:appcompat.



                                                                                  For your error for example :




                                                                                  All com.android.support libraries must use the exact same version
                                                                                  specification (mixing versions can lead to runtime crashes). Found
                                                                                  versions 25.1.1, 24.0.0. Examples include
                                                                                  com.android.support:animated-vector-drawable:25.1.1 and
                                                                                  com.android.support:mediarouter-v7:24.0.0




                                                                                  *The solution is to compile the versions of these libraries like that :



                                                                                  compile 'com.android.support:mediarouter-v7:25.1.1'



                                                                                  -if another library had the same issue and had another version just compile it with your support:appcompat version



                                                                                  This resolved my problem and I hope it resolves yours.



                                                                                  Best wishes :)






                                                                                  share|improve this answer






























                                                                                    8














                                                                                    I had the same problem before and I got the solution for it.



                                                                                    I just added the libraries that had the another version but with the same version of my support:appcompat.



                                                                                    For your error for example :




                                                                                    All com.android.support libraries must use the exact same version
                                                                                    specification (mixing versions can lead to runtime crashes). Found
                                                                                    versions 25.1.1, 24.0.0. Examples include
                                                                                    com.android.support:animated-vector-drawable:25.1.1 and
                                                                                    com.android.support:mediarouter-v7:24.0.0




                                                                                    *The solution is to compile the versions of these libraries like that :



                                                                                    compile 'com.android.support:mediarouter-v7:25.1.1'



                                                                                    -if another library had the same issue and had another version just compile it with your support:appcompat version



                                                                                    This resolved my problem and I hope it resolves yours.



                                                                                    Best wishes :)






                                                                                    share|improve this answer




























                                                                                      8












                                                                                      8








                                                                                      8







                                                                                      I had the same problem before and I got the solution for it.



                                                                                      I just added the libraries that had the another version but with the same version of my support:appcompat.



                                                                                      For your error for example :




                                                                                      All com.android.support libraries must use the exact same version
                                                                                      specification (mixing versions can lead to runtime crashes). Found
                                                                                      versions 25.1.1, 24.0.0. Examples include
                                                                                      com.android.support:animated-vector-drawable:25.1.1 and
                                                                                      com.android.support:mediarouter-v7:24.0.0




                                                                                      *The solution is to compile the versions of these libraries like that :



                                                                                      compile 'com.android.support:mediarouter-v7:25.1.1'



                                                                                      -if another library had the same issue and had another version just compile it with your support:appcompat version



                                                                                      This resolved my problem and I hope it resolves yours.



                                                                                      Best wishes :)






                                                                                      share|improve this answer















                                                                                      I had the same problem before and I got the solution for it.



                                                                                      I just added the libraries that had the another version but with the same version of my support:appcompat.



                                                                                      For your error for example :




                                                                                      All com.android.support libraries must use the exact same version
                                                                                      specification (mixing versions can lead to runtime crashes). Found
                                                                                      versions 25.1.1, 24.0.0. Examples include
                                                                                      com.android.support:animated-vector-drawable:25.1.1 and
                                                                                      com.android.support:mediarouter-v7:24.0.0




                                                                                      *The solution is to compile the versions of these libraries like that :



                                                                                      compile 'com.android.support:mediarouter-v7:25.1.1'



                                                                                      -if another library had the same issue and had another version just compile it with your support:appcompat version



                                                                                      This resolved my problem and I hope it resolves yours.



                                                                                      Best wishes :)







                                                                                      share|improve this answer














                                                                                      share|improve this answer



                                                                                      share|improve this answer








                                                                                      edited Apr 27 '17 at 19:48









                                                                                      Rumid

                                                                                      8382929




                                                                                      8382929










                                                                                      answered Apr 20 '17 at 21:11









                                                                                      Hesham MorsyHesham Morsy

                                                                                      244110




                                                                                      244110























                                                                                          6














                                                                                          You have defined any other dependency to compile with version 24.0.0 instead of 25.1.1. Please set all dependencies version the same as 25.1.1.






                                                                                          share|improve this answer
























                                                                                          • I have updated my answer all the support versions has the same version 25.1.1

                                                                                            – humazed
                                                                                            Feb 21 '17 at 17:43
















                                                                                          6














                                                                                          You have defined any other dependency to compile with version 24.0.0 instead of 25.1.1. Please set all dependencies version the same as 25.1.1.






                                                                                          share|improve this answer
























                                                                                          • I have updated my answer all the support versions has the same version 25.1.1

                                                                                            – humazed
                                                                                            Feb 21 '17 at 17:43














                                                                                          6












                                                                                          6








                                                                                          6







                                                                                          You have defined any other dependency to compile with version 24.0.0 instead of 25.1.1. Please set all dependencies version the same as 25.1.1.






                                                                                          share|improve this answer













                                                                                          You have defined any other dependency to compile with version 24.0.0 instead of 25.1.1. Please set all dependencies version the same as 25.1.1.







                                                                                          share|improve this answer












                                                                                          share|improve this answer



                                                                                          share|improve this answer










                                                                                          answered Feb 21 '17 at 17:40









                                                                                          Sneh PandyaSneh Pandya

                                                                                          4,56052042




                                                                                          4,56052042













                                                                                          • I have updated my answer all the support versions has the same version 25.1.1

                                                                                            – humazed
                                                                                            Feb 21 '17 at 17:43



















                                                                                          • I have updated my answer all the support versions has the same version 25.1.1

                                                                                            – humazed
                                                                                            Feb 21 '17 at 17:43

















                                                                                          I have updated my answer all the support versions has the same version 25.1.1

                                                                                          – humazed
                                                                                          Feb 21 '17 at 17:43





                                                                                          I have updated my answer all the support versions has the same version 25.1.1

                                                                                          – humazed
                                                                                          Feb 21 '17 at 17:43











                                                                                          6














                                                                                          I ran ./gradlew tasks --all and checked for dependencies that were a different version from the targeted version (25.3.1). You'll get something like this:



                                                                                          app:prepareComAndroidSupportAnimatedVectorDrawable2531Library - Prepare com.android.support:animated-vector-drawable:25.3.1
                                                                                          app:prepareComAndroidSupportAppcompatV72531Library - Prepare com.android.support:appcompat-v7:25.3.1
                                                                                          app:prepareComAndroidSupportCardviewV72531Library - Prepare com.android.support:cardview-v7:25.3.1
                                                                                          app:prepareComAndroidSupportCustomtabs2531Library - Prepare com.android.support:customtabs:25.3.1
                                                                                          app:prepareComAndroidSupportDesign2531Library - Prepare com.android.support:design:25.3.1
                                                                                          app:prepareComAndroidSupportMediarouterV72531Library - Prepare com.android.support:mediarouter-v7:25.3.1
                                                                                          app:prepareComAndroidSupportPaletteV72531Library - Prepare com.android.support:palette-v7:25.3.1
                                                                                          app:prepareComAndroidSupportRecyclerviewV72531Library - Prepare com.android.support:recyclerview-v7:25.3.1
                                                                                          app:prepareComAndroidSupportSupportCompat2531Library - Prepare com.android.support:support-compat:25.3.1
                                                                                          app:prepareComAndroidSupportSupportCoreUi2531Library - Prepare com.android.support:support-core-ui:25.3.1
                                                                                          app:prepareComAndroidSupportSupportCoreUtils2531Library - Prepare com.android.support:support-core-utils:25.3.1
                                                                                          app:prepareComAndroidSupportSupportFragment2531Library - Prepare com.android.support:support-fragment:25.3.1
                                                                                          app:prepareComAndroidSupportSupportMediaCompat2531Library - Prepare com.android.support:support-media-compat:25.3.1
                                                                                          app:prepareComAndroidSupportSupportV42531Library - Prepare com.android.support:support-v4:25.3.1
                                                                                          app:prepareComAndroidSupportSupportVectorDrawable2531Library - Prepare com.android.support:support-vector-drawable:25.3.1
                                                                                          app:prepareComAndroidSupportTransition2531Library - Prepare com.android.support:transition:25.3.1
                                                                                          app:prepareComAndroidVolleyVolley100Library - Prepare com.android.volley:volley:1.0.0
                                                                                          app:prepareComCrashlyticsSdkAndroidAnswers1312Library - Prepare com.crashlytics.sdk.android:answers:1.3.12
                                                                                          app:prepareComCrashlyticsSdkAndroidBeta124Library - Prepare com.crashlytics.sdk.android:beta:1.2.4
                                                                                          app:prepareComCrashlyticsSdkAndroidCrashlytics267Library - Prepare com.crashlytics.sdk.android:crashlytics:2.6.7
                                                                                          app:prepareComCrashlyticsSdkAndroidCrashlyticsCore2316Library - Prepare com.crashlytics.sdk.android:crashlytics-core:2.3.16
                                                                                          app:prepareComFacebookAndroidFacebookAndroidSdk4161Library - Prepare com.facebook.android:facebook-android-sdk:4.16.1
                                                                                          app:prepareComGoogleAndroidGmsPlayServicesAnalytics1026Library - Prepare com.google.android.gms:play-services-analytics:10.2.6
                                                                                          app:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl1026Library - Prepare com.google.android.gms:play-services-analytics-impl:10.2.6
                                                                                          app:prepareComGoogleAndroidGmsPlayServicesAuth1026Library - Prepare com.google.android.gms:play-services-auth:10.2.6
                                                                                          app:prepareComGoogleAndroidGmsPlayServicesAuthBase1026Library - Prepare com.google.android.gms:play-services-auth-base:10.2.6
                                                                                          app:prepareComGoogleAndroidGmsPlayServicesBase1026Library - Prepare com.google.android.gms:play-services-base:10.2.6
                                                                                          app:prepareComGoogleAndroidGmsPlayServicesBasement1026Library - Prepare com.google.android.gms:play-services-basement:10.2.6
                                                                                          app:prepareComGoogleAndroidGmsPlayServicesCast1026Library - Prepare com.google.android.gms:play-services-cast:10.2.6
                                                                                          app:prepareComGoogleAndroidGmsPlayServicesLocation1026Library - Prepare com.google.android.gms:play-services-location:10.2.6
                                                                                          app:prepareComGoogleAndroidGmsPlayServicesMaps1026Library - Prepare com.google.android.gms:play-services-maps:10.2.6
                                                                                          app:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4Impl1026Library - Prepare com.google.android.gms:play-services-tagmanager-v4-impl:10.2.6
                                                                                          app:prepareComGoogleAndroidGmsPlayServicesTasks1026Library - Prepare com.google.android.gms:play-services-tasks:10.2.6
                                                                                          app:prepareComGoogleFirebaseFirebaseAnalytics1026Library - Prepare com.google.firebase:firebase-analytics:10.2.6
                                                                                          app:prepareComGoogleFirebaseFirebaseAnalyticsImpl1026Library - Prepare com.google.firebase:firebase-analytics-impl:10.2.6
                                                                                          app:prepareComGoogleFirebaseFirebaseAppindexing1024Library - Prepare com.google.firebase:firebase-appindexing:10.2.4
                                                                                          app:prepareComGoogleFirebaseFirebaseCommon1026Library - Prepare com.google.firebase:firebase-common:10.2.6
                                                                                          app:prepareComGoogleFirebaseFirebaseCore1026Library - Prepare com.google.firebase:firebase-core:10.2.6
                                                                                          app:prepareComGoogleFirebaseFirebaseIid1026Library - Prepare com.google.firebase:firebase-iid:10.2.6
                                                                                          app:prepareComGoogleFirebaseFirebaseMessaging1026Library - Prepare com.google.firebase:firebase-messaging:10.2.6
                                                                                          app:prepareComMindorksPlaceholderview027Library - Prepare com.mindorks:placeholderview:0.2.7
                                                                                          app:prepareDebugAndroidTestDependencies
                                                                                          app:prepareDebugDependencies
                                                                                          app:prepareDebugUnitTestDependencies
                                                                                          app:prepareInfoHoang8fAndroidSegmented105Library - Prepare info.hoang8f:android-segmented:1.0.5
                                                                                          app:prepareIoFabricSdkAndroidFabric1316Library - Prepare io.fabric.sdk.android:fabric:1.3.16
                                                                                          app:prepareNoNordicsemiAndroidLog211Library - Prepare no.nordicsemi.android:log:2.1.1
                                                                                          app:prepareNoNordicsemiAndroidSupportV18Scanner100Library - Prepare no.nordicsemi.android.support.v18:scanner:1.0.0


                                                                                          In this case, I was targeting 25.3.1, and had some dependencies targeting different versions when I ran this command. The trick is to identify the dependencies in this list that are targeting previous versions, and overriding that by importing the most recent version of the dependency in Gradle.






                                                                                          share|improve this answer




























                                                                                            6














                                                                                            I ran ./gradlew tasks --all and checked for dependencies that were a different version from the targeted version (25.3.1). You'll get something like this:



                                                                                            app:prepareComAndroidSupportAnimatedVectorDrawable2531Library - Prepare com.android.support:animated-vector-drawable:25.3.1
                                                                                            app:prepareComAndroidSupportAppcompatV72531Library - Prepare com.android.support:appcompat-v7:25.3.1
                                                                                            app:prepareComAndroidSupportCardviewV72531Library - Prepare com.android.support:cardview-v7:25.3.1
                                                                                            app:prepareComAndroidSupportCustomtabs2531Library - Prepare com.android.support:customtabs:25.3.1
                                                                                            app:prepareComAndroidSupportDesign2531Library - Prepare com.android.support:design:25.3.1
                                                                                            app:prepareComAndroidSupportMediarouterV72531Library - Prepare com.android.support:mediarouter-v7:25.3.1
                                                                                            app:prepareComAndroidSupportPaletteV72531Library - Prepare com.android.support:palette-v7:25.3.1
                                                                                            app:prepareComAndroidSupportRecyclerviewV72531Library - Prepare com.android.support:recyclerview-v7:25.3.1
                                                                                            app:prepareComAndroidSupportSupportCompat2531Library - Prepare com.android.support:support-compat:25.3.1
                                                                                            app:prepareComAndroidSupportSupportCoreUi2531Library - Prepare com.android.support:support-core-ui:25.3.1
                                                                                            app:prepareComAndroidSupportSupportCoreUtils2531Library - Prepare com.android.support:support-core-utils:25.3.1
                                                                                            app:prepareComAndroidSupportSupportFragment2531Library - Prepare com.android.support:support-fragment:25.3.1
                                                                                            app:prepareComAndroidSupportSupportMediaCompat2531Library - Prepare com.android.support:support-media-compat:25.3.1
                                                                                            app:prepareComAndroidSupportSupportV42531Library - Prepare com.android.support:support-v4:25.3.1
                                                                                            app:prepareComAndroidSupportSupportVectorDrawable2531Library - Prepare com.android.support:support-vector-drawable:25.3.1
                                                                                            app:prepareComAndroidSupportTransition2531Library - Prepare com.android.support:transition:25.3.1
                                                                                            app:prepareComAndroidVolleyVolley100Library - Prepare com.android.volley:volley:1.0.0
                                                                                            app:prepareComCrashlyticsSdkAndroidAnswers1312Library - Prepare com.crashlytics.sdk.android:answers:1.3.12
                                                                                            app:prepareComCrashlyticsSdkAndroidBeta124Library - Prepare com.crashlytics.sdk.android:beta:1.2.4
                                                                                            app:prepareComCrashlyticsSdkAndroidCrashlytics267Library - Prepare com.crashlytics.sdk.android:crashlytics:2.6.7
                                                                                            app:prepareComCrashlyticsSdkAndroidCrashlyticsCore2316Library - Prepare com.crashlytics.sdk.android:crashlytics-core:2.3.16
                                                                                            app:prepareComFacebookAndroidFacebookAndroidSdk4161Library - Prepare com.facebook.android:facebook-android-sdk:4.16.1
                                                                                            app:prepareComGoogleAndroidGmsPlayServicesAnalytics1026Library - Prepare com.google.android.gms:play-services-analytics:10.2.6
                                                                                            app:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl1026Library - Prepare com.google.android.gms:play-services-analytics-impl:10.2.6
                                                                                            app:prepareComGoogleAndroidGmsPlayServicesAuth1026Library - Prepare com.google.android.gms:play-services-auth:10.2.6
                                                                                            app:prepareComGoogleAndroidGmsPlayServicesAuthBase1026Library - Prepare com.google.android.gms:play-services-auth-base:10.2.6
                                                                                            app:prepareComGoogleAndroidGmsPlayServicesBase1026Library - Prepare com.google.android.gms:play-services-base:10.2.6
                                                                                            app:prepareComGoogleAndroidGmsPlayServicesBasement1026Library - Prepare com.google.android.gms:play-services-basement:10.2.6
                                                                                            app:prepareComGoogleAndroidGmsPlayServicesCast1026Library - Prepare com.google.android.gms:play-services-cast:10.2.6
                                                                                            app:prepareComGoogleAndroidGmsPlayServicesLocation1026Library - Prepare com.google.android.gms:play-services-location:10.2.6
                                                                                            app:prepareComGoogleAndroidGmsPlayServicesMaps1026Library - Prepare com.google.android.gms:play-services-maps:10.2.6
                                                                                            app:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4Impl1026Library - Prepare com.google.android.gms:play-services-tagmanager-v4-impl:10.2.6
                                                                                            app:prepareComGoogleAndroidGmsPlayServicesTasks1026Library - Prepare com.google.android.gms:play-services-tasks:10.2.6
                                                                                            app:prepareComGoogleFirebaseFirebaseAnalytics1026Library - Prepare com.google.firebase:firebase-analytics:10.2.6
                                                                                            app:prepareComGoogleFirebaseFirebaseAnalyticsImpl1026Library - Prepare com.google.firebase:firebase-analytics-impl:10.2.6
                                                                                            app:prepareComGoogleFirebaseFirebaseAppindexing1024Library - Prepare com.google.firebase:firebase-appindexing:10.2.4
                                                                                            app:prepareComGoogleFirebaseFirebaseCommon1026Library - Prepare com.google.firebase:firebase-common:10.2.6
                                                                                            app:prepareComGoogleFirebaseFirebaseCore1026Library - Prepare com.google.firebase:firebase-core:10.2.6
                                                                                            app:prepareComGoogleFirebaseFirebaseIid1026Library - Prepare com.google.firebase:firebase-iid:10.2.6
                                                                                            app:prepareComGoogleFirebaseFirebaseMessaging1026Library - Prepare com.google.firebase:firebase-messaging:10.2.6
                                                                                            app:prepareComMindorksPlaceholderview027Library - Prepare com.mindorks:placeholderview:0.2.7
                                                                                            app:prepareDebugAndroidTestDependencies
                                                                                            app:prepareDebugDependencies
                                                                                            app:prepareDebugUnitTestDependencies
                                                                                            app:prepareInfoHoang8fAndroidSegmented105Library - Prepare info.hoang8f:android-segmented:1.0.5
                                                                                            app:prepareIoFabricSdkAndroidFabric1316Library - Prepare io.fabric.sdk.android:fabric:1.3.16
                                                                                            app:prepareNoNordicsemiAndroidLog211Library - Prepare no.nordicsemi.android:log:2.1.1
                                                                                            app:prepareNoNordicsemiAndroidSupportV18Scanner100Library - Prepare no.nordicsemi.android.support.v18:scanner:1.0.0


                                                                                            In this case, I was targeting 25.3.1, and had some dependencies targeting different versions when I ran this command. The trick is to identify the dependencies in this list that are targeting previous versions, and overriding that by importing the most recent version of the dependency in Gradle.






                                                                                            share|improve this answer


























                                                                                              6












                                                                                              6








                                                                                              6







                                                                                              I ran ./gradlew tasks --all and checked for dependencies that were a different version from the targeted version (25.3.1). You'll get something like this:



                                                                                              app:prepareComAndroidSupportAnimatedVectorDrawable2531Library - Prepare com.android.support:animated-vector-drawable:25.3.1
                                                                                              app:prepareComAndroidSupportAppcompatV72531Library - Prepare com.android.support:appcompat-v7:25.3.1
                                                                                              app:prepareComAndroidSupportCardviewV72531Library - Prepare com.android.support:cardview-v7:25.3.1
                                                                                              app:prepareComAndroidSupportCustomtabs2531Library - Prepare com.android.support:customtabs:25.3.1
                                                                                              app:prepareComAndroidSupportDesign2531Library - Prepare com.android.support:design:25.3.1
                                                                                              app:prepareComAndroidSupportMediarouterV72531Library - Prepare com.android.support:mediarouter-v7:25.3.1
                                                                                              app:prepareComAndroidSupportPaletteV72531Library - Prepare com.android.support:palette-v7:25.3.1
                                                                                              app:prepareComAndroidSupportRecyclerviewV72531Library - Prepare com.android.support:recyclerview-v7:25.3.1
                                                                                              app:prepareComAndroidSupportSupportCompat2531Library - Prepare com.android.support:support-compat:25.3.1
                                                                                              app:prepareComAndroidSupportSupportCoreUi2531Library - Prepare com.android.support:support-core-ui:25.3.1
                                                                                              app:prepareComAndroidSupportSupportCoreUtils2531Library - Prepare com.android.support:support-core-utils:25.3.1
                                                                                              app:prepareComAndroidSupportSupportFragment2531Library - Prepare com.android.support:support-fragment:25.3.1
                                                                                              app:prepareComAndroidSupportSupportMediaCompat2531Library - Prepare com.android.support:support-media-compat:25.3.1
                                                                                              app:prepareComAndroidSupportSupportV42531Library - Prepare com.android.support:support-v4:25.3.1
                                                                                              app:prepareComAndroidSupportSupportVectorDrawable2531Library - Prepare com.android.support:support-vector-drawable:25.3.1
                                                                                              app:prepareComAndroidSupportTransition2531Library - Prepare com.android.support:transition:25.3.1
                                                                                              app:prepareComAndroidVolleyVolley100Library - Prepare com.android.volley:volley:1.0.0
                                                                                              app:prepareComCrashlyticsSdkAndroidAnswers1312Library - Prepare com.crashlytics.sdk.android:answers:1.3.12
                                                                                              app:prepareComCrashlyticsSdkAndroidBeta124Library - Prepare com.crashlytics.sdk.android:beta:1.2.4
                                                                                              app:prepareComCrashlyticsSdkAndroidCrashlytics267Library - Prepare com.crashlytics.sdk.android:crashlytics:2.6.7
                                                                                              app:prepareComCrashlyticsSdkAndroidCrashlyticsCore2316Library - Prepare com.crashlytics.sdk.android:crashlytics-core:2.3.16
                                                                                              app:prepareComFacebookAndroidFacebookAndroidSdk4161Library - Prepare com.facebook.android:facebook-android-sdk:4.16.1
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesAnalytics1026Library - Prepare com.google.android.gms:play-services-analytics:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl1026Library - Prepare com.google.android.gms:play-services-analytics-impl:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesAuth1026Library - Prepare com.google.android.gms:play-services-auth:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesAuthBase1026Library - Prepare com.google.android.gms:play-services-auth-base:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesBase1026Library - Prepare com.google.android.gms:play-services-base:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesBasement1026Library - Prepare com.google.android.gms:play-services-basement:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesCast1026Library - Prepare com.google.android.gms:play-services-cast:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesLocation1026Library - Prepare com.google.android.gms:play-services-location:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesMaps1026Library - Prepare com.google.android.gms:play-services-maps:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4Impl1026Library - Prepare com.google.android.gms:play-services-tagmanager-v4-impl:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesTasks1026Library - Prepare com.google.android.gms:play-services-tasks:10.2.6
                                                                                              app:prepareComGoogleFirebaseFirebaseAnalytics1026Library - Prepare com.google.firebase:firebase-analytics:10.2.6
                                                                                              app:prepareComGoogleFirebaseFirebaseAnalyticsImpl1026Library - Prepare com.google.firebase:firebase-analytics-impl:10.2.6
                                                                                              app:prepareComGoogleFirebaseFirebaseAppindexing1024Library - Prepare com.google.firebase:firebase-appindexing:10.2.4
                                                                                              app:prepareComGoogleFirebaseFirebaseCommon1026Library - Prepare com.google.firebase:firebase-common:10.2.6
                                                                                              app:prepareComGoogleFirebaseFirebaseCore1026Library - Prepare com.google.firebase:firebase-core:10.2.6
                                                                                              app:prepareComGoogleFirebaseFirebaseIid1026Library - Prepare com.google.firebase:firebase-iid:10.2.6
                                                                                              app:prepareComGoogleFirebaseFirebaseMessaging1026Library - Prepare com.google.firebase:firebase-messaging:10.2.6
                                                                                              app:prepareComMindorksPlaceholderview027Library - Prepare com.mindorks:placeholderview:0.2.7
                                                                                              app:prepareDebugAndroidTestDependencies
                                                                                              app:prepareDebugDependencies
                                                                                              app:prepareDebugUnitTestDependencies
                                                                                              app:prepareInfoHoang8fAndroidSegmented105Library - Prepare info.hoang8f:android-segmented:1.0.5
                                                                                              app:prepareIoFabricSdkAndroidFabric1316Library - Prepare io.fabric.sdk.android:fabric:1.3.16
                                                                                              app:prepareNoNordicsemiAndroidLog211Library - Prepare no.nordicsemi.android:log:2.1.1
                                                                                              app:prepareNoNordicsemiAndroidSupportV18Scanner100Library - Prepare no.nordicsemi.android.support.v18:scanner:1.0.0


                                                                                              In this case, I was targeting 25.3.1, and had some dependencies targeting different versions when I ran this command. The trick is to identify the dependencies in this list that are targeting previous versions, and overriding that by importing the most recent version of the dependency in Gradle.






                                                                                              share|improve this answer













                                                                                              I ran ./gradlew tasks --all and checked for dependencies that were a different version from the targeted version (25.3.1). You'll get something like this:



                                                                                              app:prepareComAndroidSupportAnimatedVectorDrawable2531Library - Prepare com.android.support:animated-vector-drawable:25.3.1
                                                                                              app:prepareComAndroidSupportAppcompatV72531Library - Prepare com.android.support:appcompat-v7:25.3.1
                                                                                              app:prepareComAndroidSupportCardviewV72531Library - Prepare com.android.support:cardview-v7:25.3.1
                                                                                              app:prepareComAndroidSupportCustomtabs2531Library - Prepare com.android.support:customtabs:25.3.1
                                                                                              app:prepareComAndroidSupportDesign2531Library - Prepare com.android.support:design:25.3.1
                                                                                              app:prepareComAndroidSupportMediarouterV72531Library - Prepare com.android.support:mediarouter-v7:25.3.1
                                                                                              app:prepareComAndroidSupportPaletteV72531Library - Prepare com.android.support:palette-v7:25.3.1
                                                                                              app:prepareComAndroidSupportRecyclerviewV72531Library - Prepare com.android.support:recyclerview-v7:25.3.1
                                                                                              app:prepareComAndroidSupportSupportCompat2531Library - Prepare com.android.support:support-compat:25.3.1
                                                                                              app:prepareComAndroidSupportSupportCoreUi2531Library - Prepare com.android.support:support-core-ui:25.3.1
                                                                                              app:prepareComAndroidSupportSupportCoreUtils2531Library - Prepare com.android.support:support-core-utils:25.3.1
                                                                                              app:prepareComAndroidSupportSupportFragment2531Library - Prepare com.android.support:support-fragment:25.3.1
                                                                                              app:prepareComAndroidSupportSupportMediaCompat2531Library - Prepare com.android.support:support-media-compat:25.3.1
                                                                                              app:prepareComAndroidSupportSupportV42531Library - Prepare com.android.support:support-v4:25.3.1
                                                                                              app:prepareComAndroidSupportSupportVectorDrawable2531Library - Prepare com.android.support:support-vector-drawable:25.3.1
                                                                                              app:prepareComAndroidSupportTransition2531Library - Prepare com.android.support:transition:25.3.1
                                                                                              app:prepareComAndroidVolleyVolley100Library - Prepare com.android.volley:volley:1.0.0
                                                                                              app:prepareComCrashlyticsSdkAndroidAnswers1312Library - Prepare com.crashlytics.sdk.android:answers:1.3.12
                                                                                              app:prepareComCrashlyticsSdkAndroidBeta124Library - Prepare com.crashlytics.sdk.android:beta:1.2.4
                                                                                              app:prepareComCrashlyticsSdkAndroidCrashlytics267Library - Prepare com.crashlytics.sdk.android:crashlytics:2.6.7
                                                                                              app:prepareComCrashlyticsSdkAndroidCrashlyticsCore2316Library - Prepare com.crashlytics.sdk.android:crashlytics-core:2.3.16
                                                                                              app:prepareComFacebookAndroidFacebookAndroidSdk4161Library - Prepare com.facebook.android:facebook-android-sdk:4.16.1
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesAnalytics1026Library - Prepare com.google.android.gms:play-services-analytics:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl1026Library - Prepare com.google.android.gms:play-services-analytics-impl:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesAuth1026Library - Prepare com.google.android.gms:play-services-auth:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesAuthBase1026Library - Prepare com.google.android.gms:play-services-auth-base:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesBase1026Library - Prepare com.google.android.gms:play-services-base:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesBasement1026Library - Prepare com.google.android.gms:play-services-basement:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesCast1026Library - Prepare com.google.android.gms:play-services-cast:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesLocation1026Library - Prepare com.google.android.gms:play-services-location:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesMaps1026Library - Prepare com.google.android.gms:play-services-maps:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4Impl1026Library - Prepare com.google.android.gms:play-services-tagmanager-v4-impl:10.2.6
                                                                                              app:prepareComGoogleAndroidGmsPlayServicesTasks1026Library - Prepare com.google.android.gms:play-services-tasks:10.2.6
                                                                                              app:prepareComGoogleFirebaseFirebaseAnalytics1026Library - Prepare com.google.firebase:firebase-analytics:10.2.6
                                                                                              app:prepareComGoogleFirebaseFirebaseAnalyticsImpl1026Library - Prepare com.google.firebase:firebase-analytics-impl:10.2.6
                                                                                              app:prepareComGoogleFirebaseFirebaseAppindexing1024Library - Prepare com.google.firebase:firebase-appindexing:10.2.4
                                                                                              app:prepareComGoogleFirebaseFirebaseCommon1026Library - Prepare com.google.firebase:firebase-common:10.2.6
                                                                                              app:prepareComGoogleFirebaseFirebaseCore1026Library - Prepare com.google.firebase:firebase-core:10.2.6
                                                                                              app:prepareComGoogleFirebaseFirebaseIid1026Library - Prepare com.google.firebase:firebase-iid:10.2.6
                                                                                              app:prepareComGoogleFirebaseFirebaseMessaging1026Library - Prepare com.google.firebase:firebase-messaging:10.2.6
                                                                                              app:prepareComMindorksPlaceholderview027Library - Prepare com.mindorks:placeholderview:0.2.7
                                                                                              app:prepareDebugAndroidTestDependencies
                                                                                              app:prepareDebugDependencies
                                                                                              app:prepareDebugUnitTestDependencies
                                                                                              app:prepareInfoHoang8fAndroidSegmented105Library - Prepare info.hoang8f:android-segmented:1.0.5
                                                                                              app:prepareIoFabricSdkAndroidFabric1316Library - Prepare io.fabric.sdk.android:fabric:1.3.16
                                                                                              app:prepareNoNordicsemiAndroidLog211Library - Prepare no.nordicsemi.android:log:2.1.1
                                                                                              app:prepareNoNordicsemiAndroidSupportV18Scanner100Library - Prepare no.nordicsemi.android.support.v18:scanner:1.0.0


                                                                                              In this case, I was targeting 25.3.1, and had some dependencies targeting different versions when I ran this command. The trick is to identify the dependencies in this list that are targeting previous versions, and overriding that by importing the most recent version of the dependency in Gradle.







                                                                                              share|improve this answer












                                                                                              share|improve this answer



                                                                                              share|improve this answer










                                                                                              answered May 24 '17 at 16:34









                                                                                              Matt WMatt W

                                                                                              5581712




                                                                                              5581712























                                                                                                  6














                                                                                                  I have the same Problem but I solved this By adding
                                                                                                  those Three Lines



                                                                                                  implementation 'com.android.support:design:27.1.1'
                                                                                                  implementation "com.android.support:customtabs:27.1.1"
                                                                                                  implementation 'com.android.support:mediarouter-v7:27.1.1'


                                                                                                  now Every thing Works perfectly






                                                                                                  share|improve this answer




























                                                                                                    6














                                                                                                    I have the same Problem but I solved this By adding
                                                                                                    those Three Lines



                                                                                                    implementation 'com.android.support:design:27.1.1'
                                                                                                    implementation "com.android.support:customtabs:27.1.1"
                                                                                                    implementation 'com.android.support:mediarouter-v7:27.1.1'


                                                                                                    now Every thing Works perfectly






                                                                                                    share|improve this answer


























                                                                                                      6












                                                                                                      6








                                                                                                      6







                                                                                                      I have the same Problem but I solved this By adding
                                                                                                      those Three Lines



                                                                                                      implementation 'com.android.support:design:27.1.1'
                                                                                                      implementation "com.android.support:customtabs:27.1.1"
                                                                                                      implementation 'com.android.support:mediarouter-v7:27.1.1'


                                                                                                      now Every thing Works perfectly






                                                                                                      share|improve this answer













                                                                                                      I have the same Problem but I solved this By adding
                                                                                                      those Three Lines



                                                                                                      implementation 'com.android.support:design:27.1.1'
                                                                                                      implementation "com.android.support:customtabs:27.1.1"
                                                                                                      implementation 'com.android.support:mediarouter-v7:27.1.1'


                                                                                                      now Every thing Works perfectly







                                                                                                      share|improve this answer












                                                                                                      share|improve this answer



                                                                                                      share|improve this answer










                                                                                                      answered Jul 4 '18 at 7:01









                                                                                                      Hamza RahmanHamza Rahman

                                                                                                      215410




                                                                                                      215410























                                                                                                          6














                                                                                                          Here is my flow to fix this warning



                                                                                                          build.gradle



                                                                                                          android {
                                                                                                          compileSdkVersion ... // must same version (ex: 26)
                                                                                                          ...
                                                                                                          }

                                                                                                          dependencies {
                                                                                                          ...
                                                                                                          compile 'any com.android.support... library' // must same version (ex: 26.0.1)
                                                                                                          compile 'any com.android.support... library' // must same version (ex: 26.0.1)

                                                                                                          ...
                                                                                                          compile ('a library B which don't use 'com.android.support...' OR use SAME version of 'com.android.support'){
                                                                                                          // do nothing
                                                                                                          }

                                                                                                          ...
                                                                                                          compile ('a library C which use DIFFERENT 'com.android.support...' (ex:27.0.1) {
                                                                                                          // By default, if use don't do anything here your app will choose the higher com.android.support... for whole project (in this case it is 27.0.1)

                                                                                                          // If you want to use 26.0.1 use
                                                                                                          exclude group: 'com.android.support', module: '...' (ex module: 'appcompat-v7')
                                                                                                          exclude group: 'com.android.support', module: 'another module'
                                                                                                          ...

                                                                                                          // If you want to use 27.0.1 do
                                                                                                          Upgrade `compileSdkVersion` and all 'com.android.support' to 27.0.1.
                                                                                                          (It may be a good solution because the best practice is always use latest `compileSdkVersion`.
                                                                                                          However, use 26 or 27 is base on you for example higher library may have bug)
                                                                                                          }
                                                                                                          }


                                                                                                          To view/verify the dependencies of all library in your app

                                                                                                          Open terminal and run ./gradlew app:dependencies



                                                                                                          To view the dependencies of a specific library in your app follow tutorial here :- How to exclude dependencies of a particular dependency in Gradle



                                                                                                          Hope it help






                                                                                                          share|improve this answer






























                                                                                                            6














                                                                                                            Here is my flow to fix this warning



                                                                                                            build.gradle



                                                                                                            android {
                                                                                                            compileSdkVersion ... // must same version (ex: 26)
                                                                                                            ...
                                                                                                            }

                                                                                                            dependencies {
                                                                                                            ...
                                                                                                            compile 'any com.android.support... library' // must same version (ex: 26.0.1)
                                                                                                            compile 'any com.android.support... library' // must same version (ex: 26.0.1)

                                                                                                            ...
                                                                                                            compile ('a library B which don't use 'com.android.support...' OR use SAME version of 'com.android.support'){
                                                                                                            // do nothing
                                                                                                            }

                                                                                                            ...
                                                                                                            compile ('a library C which use DIFFERENT 'com.android.support...' (ex:27.0.1) {
                                                                                                            // By default, if use don't do anything here your app will choose the higher com.android.support... for whole project (in this case it is 27.0.1)

                                                                                                            // If you want to use 26.0.1 use
                                                                                                            exclude group: 'com.android.support', module: '...' (ex module: 'appcompat-v7')
                                                                                                            exclude group: 'com.android.support', module: 'another module'
                                                                                                            ...

                                                                                                            // If you want to use 27.0.1 do
                                                                                                            Upgrade `compileSdkVersion` and all 'com.android.support' to 27.0.1.
                                                                                                            (It may be a good solution because the best practice is always use latest `compileSdkVersion`.
                                                                                                            However, use 26 or 27 is base on you for example higher library may have bug)
                                                                                                            }
                                                                                                            }


                                                                                                            To view/verify the dependencies of all library in your app

                                                                                                            Open terminal and run ./gradlew app:dependencies



                                                                                                            To view the dependencies of a specific library in your app follow tutorial here :- How to exclude dependencies of a particular dependency in Gradle



                                                                                                            Hope it help






                                                                                                            share|improve this answer




























                                                                                                              6












                                                                                                              6








                                                                                                              6







                                                                                                              Here is my flow to fix this warning



                                                                                                              build.gradle



                                                                                                              android {
                                                                                                              compileSdkVersion ... // must same version (ex: 26)
                                                                                                              ...
                                                                                                              }

                                                                                                              dependencies {
                                                                                                              ...
                                                                                                              compile 'any com.android.support... library' // must same version (ex: 26.0.1)
                                                                                                              compile 'any com.android.support... library' // must same version (ex: 26.0.1)

                                                                                                              ...
                                                                                                              compile ('a library B which don't use 'com.android.support...' OR use SAME version of 'com.android.support'){
                                                                                                              // do nothing
                                                                                                              }

                                                                                                              ...
                                                                                                              compile ('a library C which use DIFFERENT 'com.android.support...' (ex:27.0.1) {
                                                                                                              // By default, if use don't do anything here your app will choose the higher com.android.support... for whole project (in this case it is 27.0.1)

                                                                                                              // If you want to use 26.0.1 use
                                                                                                              exclude group: 'com.android.support', module: '...' (ex module: 'appcompat-v7')
                                                                                                              exclude group: 'com.android.support', module: 'another module'
                                                                                                              ...

                                                                                                              // If you want to use 27.0.1 do
                                                                                                              Upgrade `compileSdkVersion` and all 'com.android.support' to 27.0.1.
                                                                                                              (It may be a good solution because the best practice is always use latest `compileSdkVersion`.
                                                                                                              However, use 26 or 27 is base on you for example higher library may have bug)
                                                                                                              }
                                                                                                              }


                                                                                                              To view/verify the dependencies of all library in your app

                                                                                                              Open terminal and run ./gradlew app:dependencies



                                                                                                              To view the dependencies of a specific library in your app follow tutorial here :- How to exclude dependencies of a particular dependency in Gradle



                                                                                                              Hope it help






                                                                                                              share|improve this answer















                                                                                                              Here is my flow to fix this warning



                                                                                                              build.gradle



                                                                                                              android {
                                                                                                              compileSdkVersion ... // must same version (ex: 26)
                                                                                                              ...
                                                                                                              }

                                                                                                              dependencies {
                                                                                                              ...
                                                                                                              compile 'any com.android.support... library' // must same version (ex: 26.0.1)
                                                                                                              compile 'any com.android.support... library' // must same version (ex: 26.0.1)

                                                                                                              ...
                                                                                                              compile ('a library B which don't use 'com.android.support...' OR use SAME version of 'com.android.support'){
                                                                                                              // do nothing
                                                                                                              }

                                                                                                              ...
                                                                                                              compile ('a library C which use DIFFERENT 'com.android.support...' (ex:27.0.1) {
                                                                                                              // By default, if use don't do anything here your app will choose the higher com.android.support... for whole project (in this case it is 27.0.1)

                                                                                                              // If you want to use 26.0.1 use
                                                                                                              exclude group: 'com.android.support', module: '...' (ex module: 'appcompat-v7')
                                                                                                              exclude group: 'com.android.support', module: 'another module'
                                                                                                              ...

                                                                                                              // If you want to use 27.0.1 do
                                                                                                              Upgrade `compileSdkVersion` and all 'com.android.support' to 27.0.1.
                                                                                                              (It may be a good solution because the best practice is always use latest `compileSdkVersion`.
                                                                                                              However, use 26 or 27 is base on you for example higher library may have bug)
                                                                                                              }
                                                                                                              }


                                                                                                              To view/verify the dependencies of all library in your app

                                                                                                              Open terminal and run ./gradlew app:dependencies



                                                                                                              To view the dependencies of a specific library in your app follow tutorial here :- How to exclude dependencies of a particular dependency in Gradle



                                                                                                              Hope it help







                                                                                                              share|improve this answer














                                                                                                              share|improve this answer



                                                                                                              share|improve this answer








                                                                                                              edited Sep 22 '18 at 4:39

























                                                                                                              answered Jan 14 '18 at 8:09









                                                                                                              LinhLinh

                                                                                                              21.4k11113141




                                                                                                              21.4k11113141























                                                                                                                  6














                                                                                                                  After searching and combining answers, 2018 version of this question and it worked for me:



                                                                                                                  1) On navigation tab change it to project view



                                                                                                                  2) Navigate to [YourProjectName]/.idea/libraries/



                                                                                                                  3) Delete all files starting with Gradle__com_android_support_[libraryName]



                                                                                                                  E.g: Gradle__com_android_support_animated_vector_drawable_26_0_0.xml



                                                                                                                  4) In your gradle file define a variable and use it to replace version number like ${variableName}



                                                                                                                  Def variable:



                                                                                                                  ext {
                                                                                                                  support_library_version = '28.0.0' //use the version of choice
                                                                                                                  }


                                                                                                                  Use variable:



                                                                                                                  implementation "com.android.support:cardview-v7:${support_library_version}"


                                                                                                                  example gradle:



                                                                                                                  dependencies {
                                                                                                                  ext {
                                                                                                                  support_library_version = '28.0.0' //use the version of choice
                                                                                                                  }

                                                                                                                  implementation fileTree(include: ['*.jar'], dir: 'libs')

                                                                                                                  implementation "com.android.support:animated-vector-drawable:${support_library_version}"
                                                                                                                  implementation "com.android.support:appcompat-v7:${support_library_version}"
                                                                                                                  implementation "com.android.support:customtabs:${support_library_version}"
                                                                                                                  implementation "com.android.support:cardview-v7:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-compat:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-v4:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-core-utils:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-core-ui:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-fragment:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-media-compat:${support_library_version}"
                                                                                                                  implementation "com.android.support:appcompat-v7:${support_library_version}"
                                                                                                                  implementation "com.android.support:recyclerview-v7:${support_library_version}"
                                                                                                                  implementation "com.android.support:design:${support_library_version}"

                                                                                                                  }





                                                                                                                  share|improve this answer





















                                                                                                                  • 1





                                                                                                                    This answer needs more explanation. A reader could be led to believe they should copy-paste your entire gradle file into their project. You should explain why you added the extension and why you set some support libs to the gplaysvcs version, others to the supportlib version, and some are unchanged.

                                                                                                                    – jungledev
                                                                                                                    Nov 19 '18 at 10:36






                                                                                                                  • 1





                                                                                                                    @jungledev updated for a clearer version

                                                                                                                    – Ali Karaca
                                                                                                                    Nov 19 '18 at 12:11
















                                                                                                                  6














                                                                                                                  After searching and combining answers, 2018 version of this question and it worked for me:



                                                                                                                  1) On navigation tab change it to project view



                                                                                                                  2) Navigate to [YourProjectName]/.idea/libraries/



                                                                                                                  3) Delete all files starting with Gradle__com_android_support_[libraryName]



                                                                                                                  E.g: Gradle__com_android_support_animated_vector_drawable_26_0_0.xml



                                                                                                                  4) In your gradle file define a variable and use it to replace version number like ${variableName}



                                                                                                                  Def variable:



                                                                                                                  ext {
                                                                                                                  support_library_version = '28.0.0' //use the version of choice
                                                                                                                  }


                                                                                                                  Use variable:



                                                                                                                  implementation "com.android.support:cardview-v7:${support_library_version}"


                                                                                                                  example gradle:



                                                                                                                  dependencies {
                                                                                                                  ext {
                                                                                                                  support_library_version = '28.0.0' //use the version of choice
                                                                                                                  }

                                                                                                                  implementation fileTree(include: ['*.jar'], dir: 'libs')

                                                                                                                  implementation "com.android.support:animated-vector-drawable:${support_library_version}"
                                                                                                                  implementation "com.android.support:appcompat-v7:${support_library_version}"
                                                                                                                  implementation "com.android.support:customtabs:${support_library_version}"
                                                                                                                  implementation "com.android.support:cardview-v7:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-compat:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-v4:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-core-utils:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-core-ui:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-fragment:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-media-compat:${support_library_version}"
                                                                                                                  implementation "com.android.support:appcompat-v7:${support_library_version}"
                                                                                                                  implementation "com.android.support:recyclerview-v7:${support_library_version}"
                                                                                                                  implementation "com.android.support:design:${support_library_version}"

                                                                                                                  }





                                                                                                                  share|improve this answer





















                                                                                                                  • 1





                                                                                                                    This answer needs more explanation. A reader could be led to believe they should copy-paste your entire gradle file into their project. You should explain why you added the extension and why you set some support libs to the gplaysvcs version, others to the supportlib version, and some are unchanged.

                                                                                                                    – jungledev
                                                                                                                    Nov 19 '18 at 10:36






                                                                                                                  • 1





                                                                                                                    @jungledev updated for a clearer version

                                                                                                                    – Ali Karaca
                                                                                                                    Nov 19 '18 at 12:11














                                                                                                                  6












                                                                                                                  6








                                                                                                                  6







                                                                                                                  After searching and combining answers, 2018 version of this question and it worked for me:



                                                                                                                  1) On navigation tab change it to project view



                                                                                                                  2) Navigate to [YourProjectName]/.idea/libraries/



                                                                                                                  3) Delete all files starting with Gradle__com_android_support_[libraryName]



                                                                                                                  E.g: Gradle__com_android_support_animated_vector_drawable_26_0_0.xml



                                                                                                                  4) In your gradle file define a variable and use it to replace version number like ${variableName}



                                                                                                                  Def variable:



                                                                                                                  ext {
                                                                                                                  support_library_version = '28.0.0' //use the version of choice
                                                                                                                  }


                                                                                                                  Use variable:



                                                                                                                  implementation "com.android.support:cardview-v7:${support_library_version}"


                                                                                                                  example gradle:



                                                                                                                  dependencies {
                                                                                                                  ext {
                                                                                                                  support_library_version = '28.0.0' //use the version of choice
                                                                                                                  }

                                                                                                                  implementation fileTree(include: ['*.jar'], dir: 'libs')

                                                                                                                  implementation "com.android.support:animated-vector-drawable:${support_library_version}"
                                                                                                                  implementation "com.android.support:appcompat-v7:${support_library_version}"
                                                                                                                  implementation "com.android.support:customtabs:${support_library_version}"
                                                                                                                  implementation "com.android.support:cardview-v7:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-compat:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-v4:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-core-utils:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-core-ui:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-fragment:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-media-compat:${support_library_version}"
                                                                                                                  implementation "com.android.support:appcompat-v7:${support_library_version}"
                                                                                                                  implementation "com.android.support:recyclerview-v7:${support_library_version}"
                                                                                                                  implementation "com.android.support:design:${support_library_version}"

                                                                                                                  }





                                                                                                                  share|improve this answer















                                                                                                                  After searching and combining answers, 2018 version of this question and it worked for me:



                                                                                                                  1) On navigation tab change it to project view



                                                                                                                  2) Navigate to [YourProjectName]/.idea/libraries/



                                                                                                                  3) Delete all files starting with Gradle__com_android_support_[libraryName]



                                                                                                                  E.g: Gradle__com_android_support_animated_vector_drawable_26_0_0.xml



                                                                                                                  4) In your gradle file define a variable and use it to replace version number like ${variableName}



                                                                                                                  Def variable:



                                                                                                                  ext {
                                                                                                                  support_library_version = '28.0.0' //use the version of choice
                                                                                                                  }


                                                                                                                  Use variable:



                                                                                                                  implementation "com.android.support:cardview-v7:${support_library_version}"


                                                                                                                  example gradle:



                                                                                                                  dependencies {
                                                                                                                  ext {
                                                                                                                  support_library_version = '28.0.0' //use the version of choice
                                                                                                                  }

                                                                                                                  implementation fileTree(include: ['*.jar'], dir: 'libs')

                                                                                                                  implementation "com.android.support:animated-vector-drawable:${support_library_version}"
                                                                                                                  implementation "com.android.support:appcompat-v7:${support_library_version}"
                                                                                                                  implementation "com.android.support:customtabs:${support_library_version}"
                                                                                                                  implementation "com.android.support:cardview-v7:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-compat:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-v4:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-core-utils:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-core-ui:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-fragment:${support_library_version}"
                                                                                                                  implementation "com.android.support:support-media-compat:${support_library_version}"
                                                                                                                  implementation "com.android.support:appcompat-v7:${support_library_version}"
                                                                                                                  implementation "com.android.support:recyclerview-v7:${support_library_version}"
                                                                                                                  implementation "com.android.support:design:${support_library_version}"

                                                                                                                  }






                                                                                                                  share|improve this answer














                                                                                                                  share|improve this answer



                                                                                                                  share|improve this answer








                                                                                                                  edited Nov 19 '18 at 12:10

























                                                                                                                  answered Sep 30 '18 at 14:08









                                                                                                                  Ali KaracaAli Karaca

                                                                                                                  8571324




                                                                                                                  8571324








                                                                                                                  • 1





                                                                                                                    This answer needs more explanation. A reader could be led to believe they should copy-paste your entire gradle file into their project. You should explain why you added the extension and why you set some support libs to the gplaysvcs version, others to the supportlib version, and some are unchanged.

                                                                                                                    – jungledev
                                                                                                                    Nov 19 '18 at 10:36






                                                                                                                  • 1





                                                                                                                    @jungledev updated for a clearer version

                                                                                                                    – Ali Karaca
                                                                                                                    Nov 19 '18 at 12:11














                                                                                                                  • 1





                                                                                                                    This answer needs more explanation. A reader could be led to believe they should copy-paste your entire gradle file into their project. You should explain why you added the extension and why you set some support libs to the gplaysvcs version, others to the supportlib version, and some are unchanged.

                                                                                                                    – jungledev
                                                                                                                    Nov 19 '18 at 10:36






                                                                                                                  • 1





                                                                                                                    @jungledev updated for a clearer version

                                                                                                                    – Ali Karaca
                                                                                                                    Nov 19 '18 at 12:11








                                                                                                                  1




                                                                                                                  1





                                                                                                                  This answer needs more explanation. A reader could be led to believe they should copy-paste your entire gradle file into their project. You should explain why you added the extension and why you set some support libs to the gplaysvcs version, others to the supportlib version, and some are unchanged.

                                                                                                                  – jungledev
                                                                                                                  Nov 19 '18 at 10:36





                                                                                                                  This answer needs more explanation. A reader could be led to believe they should copy-paste your entire gradle file into their project. You should explain why you added the extension and why you set some support libs to the gplaysvcs version, others to the supportlib version, and some are unchanged.

                                                                                                                  – jungledev
                                                                                                                  Nov 19 '18 at 10:36




                                                                                                                  1




                                                                                                                  1





                                                                                                                  @jungledev updated for a clearer version

                                                                                                                  – Ali Karaca
                                                                                                                  Nov 19 '18 at 12:11





                                                                                                                  @jungledev updated for a clearer version

                                                                                                                  – Ali Karaca
                                                                                                                  Nov 19 '18 at 12:11











                                                                                                                  6














                                                                                                                  in 2018 update for this error add implementation from project structure



                                                                                                                  implementation 'com.android.support:support-v13:28.0.0'


                                                                                                                  in project mode --> External Libraries there you can find your problem, in my case
                                                                                                                  i am using version 28 and external libraries i found
                                                                                                                  com.android.support:support-media-compat-26.0.0 and here was the error.



                                                                                                                  after implementation support v13 and it's working






                                                                                                                  share|improve this answer
























                                                                                                                  • Red underline disappeared with this implementation.

                                                                                                                    – Admiral Kunkka
                                                                                                                    Dec 17 '18 at 15:45
















                                                                                                                  6














                                                                                                                  in 2018 update for this error add implementation from project structure



                                                                                                                  implementation 'com.android.support:support-v13:28.0.0'


                                                                                                                  in project mode --> External Libraries there you can find your problem, in my case
                                                                                                                  i am using version 28 and external libraries i found
                                                                                                                  com.android.support:support-media-compat-26.0.0 and here was the error.



                                                                                                                  after implementation support v13 and it's working






                                                                                                                  share|improve this answer
























                                                                                                                  • Red underline disappeared with this implementation.

                                                                                                                    – Admiral Kunkka
                                                                                                                    Dec 17 '18 at 15:45














                                                                                                                  6












                                                                                                                  6








                                                                                                                  6







                                                                                                                  in 2018 update for this error add implementation from project structure



                                                                                                                  implementation 'com.android.support:support-v13:28.0.0'


                                                                                                                  in project mode --> External Libraries there you can find your problem, in my case
                                                                                                                  i am using version 28 and external libraries i found
                                                                                                                  com.android.support:support-media-compat-26.0.0 and here was the error.



                                                                                                                  after implementation support v13 and it's working






                                                                                                                  share|improve this answer













                                                                                                                  in 2018 update for this error add implementation from project structure



                                                                                                                  implementation 'com.android.support:support-v13:28.0.0'


                                                                                                                  in project mode --> External Libraries there you can find your problem, in my case
                                                                                                                  i am using version 28 and external libraries i found
                                                                                                                  com.android.support:support-media-compat-26.0.0 and here was the error.



                                                                                                                  after implementation support v13 and it's working







                                                                                                                  share|improve this answer












                                                                                                                  share|improve this answer



                                                                                                                  share|improve this answer










                                                                                                                  answered Dec 6 '18 at 11:33









                                                                                                                  Alwayss BijoyAlwayss Bijoy

                                                                                                                  12125




                                                                                                                  12125













                                                                                                                  • Red underline disappeared with this implementation.

                                                                                                                    – Admiral Kunkka
                                                                                                                    Dec 17 '18 at 15:45



















                                                                                                                  • Red underline disappeared with this implementation.

                                                                                                                    – Admiral Kunkka
                                                                                                                    Dec 17 '18 at 15:45

















                                                                                                                  Red underline disappeared with this implementation.

                                                                                                                  – Admiral Kunkka
                                                                                                                  Dec 17 '18 at 15:45





                                                                                                                  Red underline disappeared with this implementation.

                                                                                                                  – Admiral Kunkka
                                                                                                                  Dec 17 '18 at 15:45











                                                                                                                  5














                                                                                                                  Open the external library of your project you will see that some library still using previous version although you didn't mention those library so my suggestion is just use the particular library version for those it will solve your problem.






                                                                                                                  share|improve this answer




























                                                                                                                    5














                                                                                                                    Open the external library of your project you will see that some library still using previous version although you didn't mention those library so my suggestion is just use the particular library version for those it will solve your problem.






                                                                                                                    share|improve this answer


























                                                                                                                      5












                                                                                                                      5








                                                                                                                      5







                                                                                                                      Open the external library of your project you will see that some library still using previous version although you didn't mention those library so my suggestion is just use the particular library version for those it will solve your problem.






                                                                                                                      share|improve this answer













                                                                                                                      Open the external library of your project you will see that some library still using previous version although you didn't mention those library so my suggestion is just use the particular library version for those it will solve your problem.







                                                                                                                      share|improve this answer












                                                                                                                      share|improve this answer



                                                                                                                      share|improve this answer










                                                                                                                      answered Feb 23 '17 at 10:07









                                                                                                                      SubhoSubho

                                                                                                                      316416




                                                                                                                      316416























                                                                                                                          5














                                                                                                                          I just update my Android Support Repository to (revision: 44.0.0);
                                                                                                                          then Android SDK tools and Emulator to latest version 25.3.1 from sdk manager> SDK tools
                                                                                                                          And it solved my problem.






                                                                                                                          share|improve this answer




























                                                                                                                            5














                                                                                                                            I just update my Android Support Repository to (revision: 44.0.0);
                                                                                                                            then Android SDK tools and Emulator to latest version 25.3.1 from sdk manager> SDK tools
                                                                                                                            And it solved my problem.






                                                                                                                            share|improve this answer


























                                                                                                                              5












                                                                                                                              5








                                                                                                                              5







                                                                                                                              I just update my Android Support Repository to (revision: 44.0.0);
                                                                                                                              then Android SDK tools and Emulator to latest version 25.3.1 from sdk manager> SDK tools
                                                                                                                              And it solved my problem.






                                                                                                                              share|improve this answer













                                                                                                                              I just update my Android Support Repository to (revision: 44.0.0);
                                                                                                                              then Android SDK tools and Emulator to latest version 25.3.1 from sdk manager> SDK tools
                                                                                                                              And it solved my problem.







                                                                                                                              share|improve this answer












                                                                                                                              share|improve this answer



                                                                                                                              share|improve this answer










                                                                                                                              answered Mar 8 '17 at 15:09









                                                                                                                              Ajit ThapaAjit Thapa

                                                                                                                              514




                                                                                                                              514























                                                                                                                                  5














                                                                                                                                  For me, the error was a result of a third-party library that I imported that used older Google Support Library modules. I simply updated them to the latest version (checking on Github for example), and the error was gone. I suggest checking all the non-Google libraries that you included in your build.gradle are up to date.






                                                                                                                                  share|improve this answer




























                                                                                                                                    5














                                                                                                                                    For me, the error was a result of a third-party library that I imported that used older Google Support Library modules. I simply updated them to the latest version (checking on Github for example), and the error was gone. I suggest checking all the non-Google libraries that you included in your build.gradle are up to date.






                                                                                                                                    share|improve this answer


























                                                                                                                                      5












                                                                                                                                      5








                                                                                                                                      5







                                                                                                                                      For me, the error was a result of a third-party library that I imported that used older Google Support Library modules. I simply updated them to the latest version (checking on Github for example), and the error was gone. I suggest checking all the non-Google libraries that you included in your build.gradle are up to date.






                                                                                                                                      share|improve this answer













                                                                                                                                      For me, the error was a result of a third-party library that I imported that used older Google Support Library modules. I simply updated them to the latest version (checking on Github for example), and the error was gone. I suggest checking all the non-Google libraries that you included in your build.gradle are up to date.







                                                                                                                                      share|improve this answer












                                                                                                                                      share|improve this answer



                                                                                                                                      share|improve this answer










                                                                                                                                      answered Mar 14 '17 at 3:02









                                                                                                                                      OctocatOctocat

                                                                                                                                      1741315




                                                                                                                                      1741315























                                                                                                                                          5














                                                                                                                                          I had to add the following lines in gradle to remove the error



                                                                                                                                          compile 'com.android.support:animated-vector-drawable:25.2.0'
                                                                                                                                          compile 'com.android.support:preference-v7:25.2.0'
                                                                                                                                          compile 'com.android.support:customtabs:25.2.0'
                                                                                                                                          compile 'com.android.support:cardview-v7:25.2.0'





                                                                                                                                          share|improve this answer




























                                                                                                                                            5














                                                                                                                                            I had to add the following lines in gradle to remove the error



                                                                                                                                            compile 'com.android.support:animated-vector-drawable:25.2.0'
                                                                                                                                            compile 'com.android.support:preference-v7:25.2.0'
                                                                                                                                            compile 'com.android.support:customtabs:25.2.0'
                                                                                                                                            compile 'com.android.support:cardview-v7:25.2.0'





                                                                                                                                            share|improve this answer


























                                                                                                                                              5












                                                                                                                                              5








                                                                                                                                              5







                                                                                                                                              I had to add the following lines in gradle to remove the error



                                                                                                                                              compile 'com.android.support:animated-vector-drawable:25.2.0'
                                                                                                                                              compile 'com.android.support:preference-v7:25.2.0'
                                                                                                                                              compile 'com.android.support:customtabs:25.2.0'
                                                                                                                                              compile 'com.android.support:cardview-v7:25.2.0'





                                                                                                                                              share|improve this answer













                                                                                                                                              I had to add the following lines in gradle to remove the error



                                                                                                                                              compile 'com.android.support:animated-vector-drawable:25.2.0'
                                                                                                                                              compile 'com.android.support:preference-v7:25.2.0'
                                                                                                                                              compile 'com.android.support:customtabs:25.2.0'
                                                                                                                                              compile 'com.android.support:cardview-v7:25.2.0'






                                                                                                                                              share|improve this answer












                                                                                                                                              share|improve this answer



                                                                                                                                              share|improve this answer










                                                                                                                                              answered Apr 3 '17 at 11:03









                                                                                                                                              ShrikantShrikant

                                                                                                                                              1,30111224




                                                                                                                                              1,30111224























                                                                                                                                                  5














                                                                                                                                                  Had the same issue after updating to Android Studio 2.3, the fix was to add the following package in the build.gradle:



                                                                                                                                                  compile 'com.android.support:support-v13:25.3.1'



                                                                                                                                                  Note: Change the version to match other support library packages used in your project






                                                                                                                                                  share|improve this answer




























                                                                                                                                                    5














                                                                                                                                                    Had the same issue after updating to Android Studio 2.3, the fix was to add the following package in the build.gradle:



                                                                                                                                                    compile 'com.android.support:support-v13:25.3.1'



                                                                                                                                                    Note: Change the version to match other support library packages used in your project






                                                                                                                                                    share|improve this answer


























                                                                                                                                                      5












                                                                                                                                                      5








                                                                                                                                                      5







                                                                                                                                                      Had the same issue after updating to Android Studio 2.3, the fix was to add the following package in the build.gradle:



                                                                                                                                                      compile 'com.android.support:support-v13:25.3.1'



                                                                                                                                                      Note: Change the version to match other support library packages used in your project






                                                                                                                                                      share|improve this answer













                                                                                                                                                      Had the same issue after updating to Android Studio 2.3, the fix was to add the following package in the build.gradle:



                                                                                                                                                      compile 'com.android.support:support-v13:25.3.1'



                                                                                                                                                      Note: Change the version to match other support library packages used in your project







                                                                                                                                                      share|improve this answer












                                                                                                                                                      share|improve this answer



                                                                                                                                                      share|improve this answer










                                                                                                                                                      answered Apr 28 '17 at 13:48









                                                                                                                                                      Vahid AmiriVahid Amiri

                                                                                                                                                      4,82583974




                                                                                                                                                      4,82583974























                                                                                                                                                          5














                                                                                                                                                          Make sure all Facebook SDK dependencies use the same support library version of your project:



                                                                                                                                                          dependencies {
                                                                                                                                                          // Facebook SDK dependencies, excluding Bolts
                                                                                                                                                          compile "com.android.support:appcompat-v7:25.4.0"
                                                                                                                                                          compile "com.android.support:cardview-v7:25.4.0"
                                                                                                                                                          compile "com.android.support:customtabs:25.4.0"
                                                                                                                                                          compile "com.android.support:design:25.4.0"

                                                                                                                                                          compile "com.facebook.android:facebook-android-sdk:4.23.0"
                                                                                                                                                          }





                                                                                                                                                          share|improve this answer




























                                                                                                                                                            5














                                                                                                                                                            Make sure all Facebook SDK dependencies use the same support library version of your project:



                                                                                                                                                            dependencies {
                                                                                                                                                            // Facebook SDK dependencies, excluding Bolts
                                                                                                                                                            compile "com.android.support:appcompat-v7:25.4.0"
                                                                                                                                                            compile "com.android.support:cardview-v7:25.4.0"
                                                                                                                                                            compile "com.android.support:customtabs:25.4.0"
                                                                                                                                                            compile "com.android.support:design:25.4.0"

                                                                                                                                                            compile "com.facebook.android:facebook-android-sdk:4.23.0"
                                                                                                                                                            }





                                                                                                                                                            share|improve this answer


























                                                                                                                                                              5












                                                                                                                                                              5








                                                                                                                                                              5







                                                                                                                                                              Make sure all Facebook SDK dependencies use the same support library version of your project:



                                                                                                                                                              dependencies {
                                                                                                                                                              // Facebook SDK dependencies, excluding Bolts
                                                                                                                                                              compile "com.android.support:appcompat-v7:25.4.0"
                                                                                                                                                              compile "com.android.support:cardview-v7:25.4.0"
                                                                                                                                                              compile "com.android.support:customtabs:25.4.0"
                                                                                                                                                              compile "com.android.support:design:25.4.0"

                                                                                                                                                              compile "com.facebook.android:facebook-android-sdk:4.23.0"
                                                                                                                                                              }





                                                                                                                                                              share|improve this answer













                                                                                                                                                              Make sure all Facebook SDK dependencies use the same support library version of your project:



                                                                                                                                                              dependencies {
                                                                                                                                                              // Facebook SDK dependencies, excluding Bolts
                                                                                                                                                              compile "com.android.support:appcompat-v7:25.4.0"
                                                                                                                                                              compile "com.android.support:cardview-v7:25.4.0"
                                                                                                                                                              compile "com.android.support:customtabs:25.4.0"
                                                                                                                                                              compile "com.android.support:design:25.4.0"

                                                                                                                                                              compile "com.facebook.android:facebook-android-sdk:4.23.0"
                                                                                                                                                              }






                                                                                                                                                              share|improve this answer












                                                                                                                                                              share|improve this answer



                                                                                                                                                              share|improve this answer










                                                                                                                                                              answered Jun 20 '17 at 17:09









                                                                                                                                                              JP VenturaJP Ventura

                                                                                                                                                              2,79122950




                                                                                                                                                              2,79122950






















                                                                                                                                                                  1 2
                                                                                                                                                                  next

















                                                                                                                                                                  draft saved

                                                                                                                                                                  draft discarded




















































                                                                                                                                                                  Thanks for contributing an answer to Stack Overflow!


                                                                                                                                                                  • Please be sure to answer the question. Provide details and share your research!

                                                                                                                                                                  But avoid



                                                                                                                                                                  • Asking for help, clarification, or responding to other answers.

                                                                                                                                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                                                                                                                                  To learn more, see our tips on writing great answers.




                                                                                                                                                                  draft saved


                                                                                                                                                                  draft discarded














                                                                                                                                                                  StackExchange.ready(
                                                                                                                                                                  function () {
                                                                                                                                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f42374151%2fall-com-android-support-libraries-must-use-the-exact-same-version-specification%23new-answer', 'question_page');
                                                                                                                                                                  }
                                                                                                                                                                  );

                                                                                                                                                                  Post as a guest















                                                                                                                                                                  Required, but never shown





















































                                                                                                                                                                  Required, but never shown














                                                                                                                                                                  Required, but never shown












                                                                                                                                                                  Required, but never shown







                                                                                                                                                                  Required, but never shown

































                                                                                                                                                                  Required, but never shown














                                                                                                                                                                  Required, but never shown












                                                                                                                                                                  Required, but never shown







                                                                                                                                                                  Required, but never shown











                                                                                                                                                                  Popular posts from this blog

                                                                                                                                                                  Ottavio Pratesi

                                                                                                                                                                  Tricia Helfer

                                                                                                                                                                  15 giugno