Android Studio Error- Mixing Versions Can Lead To Run-time Crashes
Solution 1:
Here exist an error!
compile'com.android.support:appcompat-v7:25.3.1'
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.3.1, 25.3.0. Examples include 'com.android.support:animated-vector-drawable:25.3.0' and 'com.android.support:mediarouter-v7:24.0.0'
Seeing this Examples
include 'com.android.support:animated-vector-drawable:25.3.0'
and 'com.android.support:mediarouter-v7:24.0.0'
Just add these codes in dependencies, make sure that versions are same.
Just update build.gradle
file with this :-
compile'com.android.support:animated-vector-drawable:25.3.1'compile'com.android.support:mediarouter-v7:25.3.1'
Solution 2:
The problem is that you use two (or more) different versions of the same dependency. The first one is specified in your gradle file and the other dependencies are used by library which you use (in this case firebase-ui probably).
You have more options here. At first you should try to update firebase-ui dependency. They usually keep their support dependecies updated so I guess that they use the same version of support libraries as you in their current master branch (I guess that you use the newest 'com.android.support:appcompat' version, right?). If the last version of firebase-auth doesn't use the current version of support libraries you can either downgrade your support libraries version so it will match their either you can create your own fork of firebase-auth and keep it updated on your own.
Solution 3:
What you need to do is check the which library dependency version is conflicting
you can track that library with Run androidDependancies like:
and then find that conflicting dependency and add those dependencies with updated versions in your gradle file.
Solution 4:
Add these lines of code in your build.gradle (Module:app)
file at end:
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '27.1.1'
}
}
}
}
You must change useVersion
from '25.3.1' to your current compile/implementation SDK version.
NOTE:
If you are still using compile
in your build.gradle file then replace it with implementation
or api
because compile support will be ended officially at the end of 2018.
For more details you may refer:
Error: when I replace compile with implementation in gradle(dependency)
What's the difference between implementation and compile in gradle
Solution 5:
putting
//noinspection GradleCompatible
Solved my issue
Post a Comment for "Android Studio Error- Mixing Versions Can Lead To Run-time Crashes"