build.gradle – implementation ''-ThrowExceptions

Exception or error:

I am moving my first steps with app programming.

I searched the other topics that relate to this matter and tried all the solutions but still it’s driving me mad:

building on Android Studio I cannot make it through this error about

implementation '' :

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


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).

if i ignore it with the command “noinspection” then the apk does not run on my phone. I tried to add some dependencies like in the example line but it doesn’t work at this point i show above, because if add “support version 4:26.1.0 it tells me it’s not the latest and if i upgrade it writing 7:28.0.0 it doesn’t work either.

Can anyone help me please?
Thank you for your time!

Edit: this is my build.gradle

I applied suggestions below (THANKS!!) and the error is not showing anymore, BUT my app still crashes both in emulator and in my device (galaxy a6+).

How to solve:

add implementation '' in your

as an old version of is there imported by some other library which is causing the issue with, similarly add the other implementations that occur after this one.
so final would be like

implementation '' 
implementation ''


add the below implementation in gradle file :

implementation ''


You must update your

compileSdkVersion 28   &   targetSdkVersion 28

then Use

   implementation ''
   implementation ''

This is the stable release of Support Library 28.0.0 and is suitable for use in production. This will be the last feature release under the packaging, and developers are encouraged to migrate to AndroidX.


compileSdkVersion 28 & targetSdkVersion 28


Leave a Reply

Your email address will not be published. Required fields are marked *