# How to solve Gradle’s “must use the exact same version specification” error
[SOURCE](https://stackoverflow.com/a/42374426), [SOURCE](https://stackoverflow.com/a/42582204)
For Android Studio 3.1.1
Sometimes Gradle will throw this error when trying to build:
```
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
```
Long answer short , even though you are not directly depending a dependency some of your other dependencies might. So we need to either:
- Run a dependency report to see which one is conflicted by:
1. In Android Studio, click Terminal tab and paste this in:
```
./gradlew -q dependencies app:dependencies --configuration debugAndroidTestCompileClasspath
```
or shorter version
```
./gradlew app:dependencies
```
2. If you encounter JDK not install error, see *How To Use The Bundled JDK in Android Studio To Run Gradle Command In Terminal* ([Gist](https://gist.github.com/vxhviet/da8563d5578f73ab96089584378df401), [Cacher](https://snippets.cacher.io/snippet/493f0b893ceccddbefe6)).
- Or 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"`