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

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

    As you already seen the all answers and comments above but this answer is to clear something which a new developer might not get easily.

    ./gradlew -q dependencies app:dependencies --configuration compile

    The above line will save your life with no doubt but how to get the exact point from the result of above line.

    When you get the all dependency chart or list from the above command then you have to search the conflicting version number which you are getting in your code. please see the below image.

    in the above image you can see that 23.4.0 is creating the problem but this we not able to find in our gradle file. So now this version number(23.4.0) will save us. When we have this number then we will find this number in the result of above command result and directly import that dependency directly in our gradle file. Please see the below image to get the clear view.

    you can clearly see that com.android.support:cardview-v7:23.4.0 and com.android.support:customtabs:23.4.0 are using the version which is creating the problem. Now just simply copy those line from dependency list and explicitly use in our gradle file but with the updated version link

    implementation "com.android.support:cardview-v7:26.1.0" implementation "com.android.support:customtabs:26.1.0"

提交回复
热议问题