Have recently upgraded to Android Studio 3.1, and at the same time I'm trying the Android P preview.
I'm getting the following error on compiling:
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0-alpha1, 26.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0-alpha1 and com.android.support:support-media-compat:26.1.0 less... (Ctrl+F1) 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).
But I cannot see any instance of 26.1.0
anywhere. All I have in my gradle is:
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support:design:28.0.0-alpha1'
I've tried clearing caches, rebuilding app, etc. But error remains.
Simple and easy solution is to add manually conflicting versions of android-support.
Mixing version can lead to runtime crashes
Just follow and solve your issue.
go to your gradle script-->build gradle(Module:app) in the dependency section and implement the conflicting version for ease go to the link.
Make sure there is no space during implementation.
you can follow the link.
add in dependencies of build.grad (Module.app)
I think your gradle file has the below dependency. Add this to your app level build.gradle.
In my case adding support-v4 helped me to got loose of warning.
You need to override the conflicted libraries by adding the conflicted libraries to your dependencies block