티스토리 뷰

반응형




All com.android.support libraries must use the exact same version specification(mixing versions can lead to runtime crashes)


안드로이드 스튜디오 Gradle support library Version 빌드 에러


   에러 내용

안드로이드 스튜디오 3.1.0 이상 버전에서 기존 프로젝트에서 아래와 같은 Gradle 빌드 에러가 나타난다.

CustomtabsMediarouter 의 버전문제로 안내된다.


com.google.android.gms:play-services를 함께 Dependencies에 사용하면 나타나는 듯 하다.

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

There are some combinations 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 in particular, a version lower than your targetSdkVersion.)



   Solution


build.gradle의 dependencies에 Customtabs와 Mediarouter 명시적으로 추가한다.

...
compile 'com.android.support:appcompat-v7:25.3.0' //Google Component
compile 'com.android.support:customtabs:25.3.0'
compile 'com.android.support:mediarouter-v7:25.3.0'
...

위와 같이 support  라이브러리 버전에 맞춰 추가하고 다시 빌드하면 에러가 사라진다.

반응형
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함