출처 : http://imsoli.blogspot.kr/2014/07/android-javalangnoclassdeffounderror.html


[Android] java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable

[Android] java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable


<현상>

안드로이드 개발자 사이트의 Support Library Setup(https://developer.android.com/tools/support-library/setup.html) 을 참고하여 Adding libraries with resources 방식으로 Android Support Library 를 추가하고 개발프로젝트를 실행하니 제목과 같은 에러가 발생.


<원인>

Adding libraries with resources 방식은, 라이브러리 프로젝트를 생성하여 개발프로젝트에 라이브러리를 추가하는 방법.
컴파일 할때는 라이브러리 프로젝트의 소스를 참고하여 이상이 없었으나,
실행하기 위해 APK를 만들 때 라이브러리 프로젝트의 Bin 폴더에 있는 리소스를 가져와서 APK를 만드는데, 라이브러리 프로젝트를 한 번도 Build 안했다면 Bin폴더에 아무것도 존재하지 않아 실행시 라이브러리를 찾을 수 없어 위와 같은 에러가 발생.


<해결방법>

라이브러리 프로젝트를 Build하고, 개발프로젝트를 Clean & Build 하고 실행하니 위의 에러가 해결.


'Android > TroubleShooting' 카테고리의 다른 글

Fragment - Activity has been destoryed Problem  (0) 2016.07.17

+ Recent posts