All com.android.support libraries must use the exact same version specification

前端 未结 30 2149
忘掉有多难
忘掉有多难 2020-11-21 05:10

After updating to android studio 2.3 I got this error message. I know it\'s just a hint as the app run normally but it\'s really strange.

All com.andr

相关标签:
30条回答
  • 2020-11-21 05:58

    If the same error is on appcompat

    implementation 'com.android.support:appcompat-v7:27.0.1'
    

    then adding design solved it.

    implementation 'com.android.support:appcompat-v7:27.0.1'
    implementation 'com.android.support:design:27.0.1'
    

    For me, adding

    implementation 'de.mrmaffen:vlc-android-sdk:2.0.6'
    

    was including appcompat-v7:23.1.1 in

    .idea/libraries

    without vlc, appcompat alone is enough.

    0 讨论(0)
  • 2020-11-21 05:58

    I had to add the following lines in gradle to remove the error

    compile 'com.android.support:animated-vector-drawable:25.2.0'
    compile 'com.android.support:preference-v7:25.2.0'
    compile 'com.android.support:customtabs:25.2.0'
    compile 'com.android.support:cardview-v7:25.2.0'
    
    0 讨论(0)
  • 2020-11-21 06:00

    I have the same Problem but I solved this By adding those Three Lines

    implementation 'com.android.support:design:27.1.1'
    implementation "com.android.support:customtabs:27.1.1"
    implementation 'com.android.support:mediarouter-v7:27.1.1'
    

    now Every thing Works perfectly

    0 讨论(0)
  • 2020-11-21 06:01

    I have faced this problem after upgrading to android studio 3.4 and sdk version to 28.0.0. Applying below dependency solved the problem for me.

        implementation 'com.android.support:exifinterface:28.0.0'
    
    0 讨论(0)
  • 2020-11-21 06:02
    1. Go to project/.idea/libraries folder on your file system and see which libraries are different.
    2. You will have to manually include these libraries with the same version in your build.gradle file.
    3. Then, sync your project.

    E.g.:

    compile 'com.android.support:appcompat-v7:25.2.0'
    
    // Wrong library version found on 1st point
    compile 'com.android.support:customtabs:25.2.0'
    
    0 讨论(0)
  • 2020-11-21 06:02

    For all cases, not just for these versions or libraries:

    Pay attention to the little information window that say something about the error, it says the examples that you have to change and add.

    In this case:

    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

    Your

    com.android.support:animated-vector-drawable:25.1.1

    is version 25.1.1, and your

    com.android.support:mediarouter-v7:24.0.0

    is version 24.0.0, so you have to add the mediarouter with the same version:

    com.android.support:mediarouter-v7:25.1.1
    

    And do that for every example that the little information window says, in this case all the libraries that doesn't have the version 25.1.1.

    You have to sync the gradle after you fix the indicated library to see the next library and package that you have to change.

    IMPORTANT:

    If you are not explicitly using one or more specified libraries and it is giving you the error, it means that is being used internally by another library, compile it explicitly anyway.

    You also can use another method to see the difference of the versions of all the libraries that you are actually compiling (like run a gradle dependency report or go to your libraries files), the real objetive is compile all the libraries that you are using with the same version.

    0 讨论(0)
提交回复
热议问题