Solved: Error: All libraries must use the exact same version specification

If you are trying to compile an android Application which is developed by someone or you downloaded from github, there are chances if you compile from command line using “./gradlew clean build” you may see an error like as below,

Error: All libraries must use the exact same
version specification (mixing versions can lead to runtime crashes).
Found versions 28.0.0, 26.1.0. Examples include and [GradleCompatible]

The problem with this is that there has been some version mismatch has happened between the libraries you used, its possible that the you may have used the same version everywhere in build.gradle but the libraries you have included, might have been using different versions internally.

Related :   Solved: Error: Version 28 (intended for Android Pie and below) is the last version of the legacy support library

Solution :

As we can see from error logs, mediarouter library version is v7-26.1.0 and vector-drawable version is 28.0.0, so if we opened app/build.gradle, our source code was using 28.0.0 for all libraries, so possible some dependent library was using mediarouter v7:26.1.0,

To resolve this, add proper “implementation” line for the respective library and version in app/build.gradle, so we added

dependencies {
     implementation ""


Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )


1 thought on “Solved: Error: All libraries must use the exact same version specification”

Leave a Comment

Android Android Applications Android Build system Android Commands Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded