-1

This is my gradle file--------

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

enter image description here

I got "All com.android.support libraries must use the exact same version specification" ërror in android studio.... how to resolve this...

Syfer
  • 4,262
  • 3
  • 20
  • 37
Lubna Khan
  • 91
  • 1
  • 8
  • 1
    Simply change your build tool version higher or equal than your appcompat dependency. Or change the app compat dependency to 25.0.0. – Andy Developer Jul 29 '17 at 11:49
  • let me share an article I wrote on about managing dependencies versions effectively http://www.technotalkative.com/androiddev-tip-4-managing-android-dependencies-versions/ – Paresh Mayani Jul 29 '17 at 12:43
  • 3
    Possible duplicate of [All com.android.support libraries must use the exact same version specification](https://stackoverflow.com/questions/42374151/all-com-android-support-libraries-must-use-the-exact-same-version-specification) – Pieter van den Ham Jul 29 '17 at 14:17

3 Answers3

0

compile 'com.android.support:appcompat-v7:26.+' compile 'com.android.support:cardview-v7:26.+' etc put same version to all support library and +. It will work

0

Reason to getting this error is your buildToolsVersion "25.0.2" and your appcompat dependency is compile 'com.android.support:appcompat-v7:25.1.1'.

In this case your buildToolsVersion is lower than your compile dependency so try to increase your buildToolsVersion or you can set your appcompat dependency to 25.0.0.

compile 'com.android.support:appcompat-v7:25.0.0'
Andy Developer
  • 3,071
  • 1
  • 19
  • 39
0

Just use same version code for all design support library like bellow:

compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.android.support:support-v4:24.2.1'
Rajesh Gauswami
  • 572
  • 7
  • 22