• [게임 개발] android-support-v4.jar 버전 충돌 문제 해결2015.04.23 AM 07:44

게시물 주소 FONT글자 작게하기 글자 키우기
LINK : //ralf79.tistory.com/373

안드로이드 개발을 하다보면 Android SDK Manager를 통해 버전업 패치를 하는 경우가 있죠.
전부 최신으로 버전업하면 좋지만, 가끔씩은 최신 패치 적용 후 이전 소스에서 문제가 되는 경우가 발생하기도 해서...

일단은 필요할 때 필요한 내용만 업데이트를 하고 있는데요.
어느 순간부터인가 새로운 프로젝트를 생성하면 android-support-v4.jar 충돌 에러가 뜨더라구요.

==========================================================================================
[2015-04-23 07:30:43 - NicePokerN] Found 2 versions of android-support-v4.jar in the dependency list,
[2015-04-23 07:30:43 - NicePokerN] but not all the versions are identical (check is based on SHA-1 only at this time).
[2015-04-23 07:30:43 - NicePokerN] All versions of the libraries must be the same at this time.
[2015-04-23 07:30:43 - NicePokerN] Versions found are:
[2015-04-23 07:30:43 - NicePokerN] Path: D:\Work\Unity\Android\NicePoker_Plugin\NicePoker_Nstore_Plugin\libs\android-support-v4.jar
[2015-04-23 07:30:43 - NicePokerN] Length: 1157300
[2015-04-23 07:30:43 - NicePokerN] SHA-1: b1fe665b784aa7314d722b2ec17e77f83ba2e717
[2015-04-23 07:30:43 - NicePokerN] Path: D:\Work\Unity\Android\appcompat_v7\libs\android-support-v4.jar
[2015-04-23 07:30:43 - NicePokerN] Length: 758727
[2015-04-23 07:30:43 - NicePokerN] SHA-1: efec67655f6db90757faa37201efcee2a9ec3507
[2015-04-23 07:30:43 - NicePokerN] Jar mismatch! Fix your dependencies
==========================================================================================

이럴 경우 저는 주로 새로운 프로젝트의 libs에 있는 android-support-v4.jar를 지우는 방법으로 해결했었는데요.
지우지 말고 두 jar 파일 버전을 최신으로 올리는 방법으로도 해결 가능했네요.
어느쪽이던 상관은 없지만 최신으로 올리는 게 마음이 더 편한거 같습니다. :)


관련 링크에 원문 url을 달아놨고요.
1. 메인 프로젝트 root 위에 마우스 오른쪽 버튼을 클릭
2. 메뉴중 [Android Tools > Add Support Library...] 실행
3. 라이브러리 프로젝트 (저같은 경우 google-play-services_lib)도 1~2번 실행

이걸로 버전이 달라서 충돌 생겼던 오류가 사라졌습니다.
댓글 : 1 개
위 내용으로도 해결 안되는 경우가 발생했습니다.
1. Add Support Library... 실행 말고
2. 새로운 프로젝트의 libs에 있는 android-support-v4.jar을 *지우는* 방법 말고
두 프로젝트 중 최신 버전의 android-support-v4.jar을 복사해서 이전 버전에 덮어 쓰는 것으로 해결 가능합니다. (이 방법이 제일 쉽네요)
친구글 비밀글 댓글 쓰기