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

前端 未结 30 2161
忘掉有多难
忘掉有多难 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 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.

提交回复
热议问题