• Register
0 votes
76 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

Please log in or register to answer this question.

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

0 votes
0 answers 2 views
2 views
Problem: After upgrading to android studio 2.3 I get this error message. I know this is just a suggestion as the app runs normally, but it's really weird. All com.android.support libraries must use the exact same version of the specification (mixing of versions can lead to ... .maps.android:android-maps-utils:0.4.4' compile 'com.github.jd-alexander:library:1.1.0' } Hope I could find some help.
asked Apr 5 sasha 16.2k points
0 votes
1 answer 1 view
1 view
Problem: I have upgraded my Android Studio and I found many problems in the latest version. Although many similar questions exist, I checked the answers to all and none of them worked for me! Here is the error I'm facing while compiling the code: ... ERROR, text=Program type already present: android.support.v4.app.BackStackRecord$Op, sources=[Unknown source file], tool name=Optional.of(D8)}.
asked 3 days ago Humaira ahmed 50.7k points
1 vote
1 answer 395 views
395 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 17 views
17 views
Problem: how can solve this question please solve it... the two build files generated by android studio are in ________________.
asked Apr 1 Ifra 34.7k points
0 votes
1 answer 4 views
4 views
Problem: I am stuck now .. need some suggestions .. please help me .. Note some input files use or override a deprecated api
asked Apr 26 Ifra 34.7k points
0 votes
1 answer 11 views
11 views
Problem: I get this error in my Logcat: Manifest merger failed with multiple errors, see logs that I have Linked with it
asked Mar 17 ummesalma 29.2k points
0 votes
1 answer 726 views
726 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, 2020 jwilliam 3.9k points
0 votes
1 answer 41 views
41 views
Problem: warning:unable to find optional library: org.apache.http.legacy
asked Feb 21 charles mathews 5.5k points
0 votes
1 answer 136 views
136 views
Problem: re-download dependencies and sync project (requires network)
asked Feb 16 Ethan ross 2.7k points
0 votes
2 answers 1.2K views
1.2K 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, 2020 jwilliam 3.9k points