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

前端 未结 30 2670
忘掉有多难
忘掉有多难 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:47

    The best way to solve the problem is implement all 'com.android.support:...' suggested by Android Studio

    (Doesn't matter which support versions you are using – 27.1.1, 28.0.0 etc.)

    Place the cursor to the error line e.g.

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

    Android Studio will suggest you which 'com.android.support:...' is different version than 'com.android.support:appcompat-v7:28.0.0'

    Example

    All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 27.1.0, 27.0.2. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:exifinterface:27.1.0

    So add com.android.support:animated-vector-drawable:28.0.0 & com.android.support:exifinterface:28.0.0. Now sync gradle file.

    One by one try to implement all the suggested 'com.android.support:...' until there is no error in this line implementation 'com.android.support:appcompat-v7:28.0.0'

    In my case, I added

    implementation 'com.android.support:appcompat-v7:28.0.0'
    
    implementation 'com.android.support:animated-vector-drawable:28.0.0'
    implementation 'com.android.support:exifinterface:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.android.support:customtabs:28.0.0'
    implementation 'com.android.support:support-media-compat:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    

    All these dependencies, it could be different for you.

提交回复
热议问题