• Register
0 votes
56 views

Problem :

After updating my android studio to android studio 2.3 I facing below error message. I know it is giving me just the hint as my app is running normally but it looks really strange.

“All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.1.1, 24.0.0. Examples include com.android.support:animated-vector-drawable:25.1.1 and com.android.support:mediarouter-v7:24.0.0”

6 5 3
7,540 points

2 Answers

0 votes

Solution :


You need to add explicitly a library with your old version but with the new version number which was my case it was com.android.support:customtabs:26.1.0 so I need to add the below one :

implementation "com.android.support:customtabs:27.0.2

Take your library from the second item, and just implement it with a version number from the first.

Note: Please do not forget to press the sync now so that the graddle can rebuild your dependency graph and it can also make sure if there are any more conflicts.

Detailed Explanation:
you may be baffled by your error message as it reads do not use the customtabs so how I have the conflict!!
Well you didn't use it straight but one of the libraries uses an older version of the customtabs internally, that’s why you need to ask for it directly.

 

Hope this solves your issue.

9 7 4
38,600 points
0 votes

Solution:

Few or one of your libraries exercise an old version of customtabs internally, that's why this warning message is displaying. In case you implement this with the latest version then the warning will be gone.

implementation 'com.android.support:customtabs:28.0.0'

Afterwards including this I have also displayed the same error for another older version of dependencies. After including this also all warning is gone.

implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'

Hope this will help you to solve your issue.

Update:

As of Android studio 3.0, it turns much easier as it currently shows a more helpful hint, so we just require to follow this hint.
for example:

All com.android.support libraries should employ the exact similar version specification (mixing versions can lead to runtime crashes). Found versions 27.0.2, 26.1.0. Examples included com.android.support:animated-vector-drawable:27.0.2 and com.android.support:customtabs:26.1.0

There are frw summation 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 specifically, a version lower than your targetSdkVersion.)

Include apparently the library with the old version however with a new version number.
in my instance com.android.support:customtabs:26.1.0 so I require to include:

implementation "com.android.support:customtabs:27.0.2"  

For example- Take the library from the second item, and performed it with the version number from the first.

Note: don't forget to press sync now so gradle can rebuild the dependency graph and view in case there are any more conflicts.

Explanation:

You may be distracted by the error message as don't employ customtabs so how I have a conflict!!
well. you didn't employ it directly however one of your libraries uses an old version of customtabs internally, so you require to ask for it directly.

In case you are inquisitive to know which of your libraries is responsible for the old version and maybe ask the author to update his lib, Run a Gradle dependency report, view the old answer to know how.

10 6 4
31,120 points

Related questions

1 vote
1 answer 274 views
274 views
Problem : After updating my android studio, I am facing below error. How can I fix this error?? org.gradle.execution.MultipleBuildFailures: Build completed with 1 failures. at org.gradle ... .execute(SessionFailureReportingActionExecuter.java:63) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:53)
asked Dec 11, 2019 alecxe 7.5k points
0 votes
1 answer 359 views
359 views
Problem : Recently I have updated to Android Studio 3.1. But my project is not running anymore. I have searched for the solution all over the internet with zero positive results. Below is the error that I get in my Logcat: “Java.lang.noclassdeffounderror: ... sdk:4.+'     implementation 'com.parse:parsefacebookutils-v4-android:1.10.3@aar'     implementation 'com.commit451:PhotoView:1.2.4' }
asked Jan 30 jwilliam 3.9k points
0 votes
2 answers 655 views
655 views
Problem : Currently I am using the Android Studio 2.1 but when I try to run it the suddenly my App shows me the below error Message my Gradle Build saying the following Exception is: org.gradle. ... .execute(SkipEmptySourceFilesTaskExec uter.java:52) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.j ava:52)
asked Jan 31 jwilliam 3.9k points
0 votes
1 answer 374 views
374 views
Problem : I am facing the gradle error at the building from few days it just came randomly. My project depends on the multiple libraries and it built without the problems until few days (even with a libraries) ... .gradle.api.internal.changedetection.state.CacheLockReleasingTaskExecuter$1.run(CacheLockReleasingTaskExecuter.java:40) at org.gradle.internal.Factories$1.create(Factories.java:26)
asked Jan 30 jwilliam 3.9k points
0 votes
2 answers 44 views
44 views
Problem : I have already replaced every occurrence of a compile by implementation in the project's build.gradle, but I am still facing below warning : “Warning: configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'” I also tried to look for a "compile" in a whole project but no match was found. So what is the cause of the warning?
asked Jan 30 jwilliam 3.9k points