Udacity 에서 Firebase 학습을 따라하다가, github 프로젝트를 받았는데, 빌드나 실행은 잘 되지만, Activity layout 디자인이 Android Studio에서 에러를 내며 보이지 않는 일이 생겼습니다.
에러가 다음과 같이 나와 android.support.v4 관련 찾아보며 사람 헷갈리게 만들고 엄청 헤메었는데,
The following classes could not be instantiated: - android.support.v7.widget.AppCompatImageView (Open Class, Show Exception, Clear Cache) - android.support.v7.widget.ActionBarContainer (Open Class, Show Exception, Clear Cache) - android.support.v7.widget.Toolbar (Open Class, Show Exception, Clear Cache) - android.support.v7.widget.AppCompatTextView (Open Class, Show Exception, Clear Cache) - android.support.v7.widget.ActionBarContextView (Open Class, Show Exception, Clear Cache) - android.support.v7.app.WindowDecorActionBar (Open Class, Show Exception, Clear Cache) - android.support.v7.widget.ActionBarOverlayLayout (Open Class, Show Exception, Clear Cache) Exception Details java.lang.ClassNotFoundException: android.support.v4.view.TintableBackgroundView
이상한데서 해결책을 찾았습니다.
https://stackoverflow.com/questions/44223687/render-error-in-android-studio-3-0-layout-editor
결론은 styles.xml에서 테마를
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> </style>
에서
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"> </style>
와같이 변경하는 것이었네요. 별게 다 문제를 일으키나 싶은데… 정확한 이유는 복잡해 보이니 패스. 크흠.