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

1 vote
1 answer 334 views
334 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 502 views
502 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
2 answers 868 views
868 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
0 votes
1 answer 461 views
461 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, 2020 jwilliam 3.9k points
0 votes
2 answers 67 views
67 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, 2020 jwilliam 3.9k points
0 votes
1 answer 632 views
632 views
Problem : When I try to build my app, I face follow error : Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'. More than one file was found with OS independent path 'META-INF/LICENSE' When I try to add below code ... .LeakCanary.isInAnalyzerProcess(LeakCanary.java:145) at cn.sz.cyrus.wemz.TestApplication.onCreate(TestApplication.kt:32) Who knows how to solve this?
asked Jan 21, 2020 jwilliam 3.9k points
0 votes
1 answer 175 views
175 views
Problem: Currently I am trying to explore gradle and my question may be naive. I have already noted from my gradle docs about below the plugin- apply plugin: 'application' The Application plugin facilitates creating an executable JVM application. It makes ... make a jar runnable or creating executable the JVM application. Does that clearly mean skipping does not make a application executable ?
asked Jul 8, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 36 views
36 views
Problem : Recently I had preinstalled my laptop and then switched to Windows 10. Before that I had saved my project in the Android Studio 2.2.3 and then I downloaded the same version of the Android Studio after I completed the preinstallation of my laptop, but if I ... . Blockquote I had tried all of the steps mentioned by Android Studio to resolve the error but I am still facing the same issue.
asked Feb 22, 2020 mphil 2.3k points
0 votes
1 answer 57 views
57 views
Problem : I am new to Android. Recently I have installed the Android studio 3.1.3 and it started giving me the dependencies error if tried to make the new project and tried to compile for the first time. “Unable to resolve dependency for ':app@debug/compileclasspath': could not resolve project”
asked Feb 18, 2020 mphil 2.3k points
0 votes
1 answer 48 views
48 views
Problem : I am trying to dynamically add and remove the tab in my tablayout. I have already used the FragmentPagerAdapter. I have my TabLayout and inside the TabLayout I have the ViewPager.I am able to add my tabs dynamically but while trying to remove my tab the viewpagers ... deleted and tab is also deleted. As a result my tab is unable to show the specific fragment. How can I fix this issue?
asked Feb 13, 2020 mphil 2.3k points