안드로이드
Failed to instantiate one or more classes 에러
홍규홍규
2018. 7. 6. 14:16
안드로이드 스튜디오 Preview 에서 다음과 같은 에러가 발생하면서 Preview가 작동하지 않는 문제가 있다.
Failed to instantiate one or more classes
The following classes could not be instantiated:
- android.supportv7.widgetActionBarContainer (Open Class, Show Exception, Clear Cache)
-
- ....
Tip: Use ...
Maven Repository 를 추가할 때 발생한다고 하는데 정확하게는 나도 잘 모르겠다.
여러가지 해결 방법이 있었는데 내 경우에는 다음과 같은 방법으로 해결되었다.
src/res/values/styles.xml의 다음 부분을 찾는다.
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
이 부분을 다음과 같이 변경.
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
이상 끗~!