프로그래밍/Android 짜투리 지식
[android] Android studio xml rendering e
선제
2016. 8. 2. 18:58
Android Studio xml preview에서 아래와 같은 오류 메시지와 함께 Layout이 안나올 때가 있다.
Rendering Problems The following classes could not be instantiated:
- android.support.v7.app.WindowDecorActionBar (Open Class, Show Exception, Clear Cache)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE Exception Details java.lang.NullPointerException at android.support.v7.app.WindowDecorActionBar.getDecorToolbar(WindowDecorActionBar.java:241) at android.support.v7.app.WindowDecorActionBar.init(WindowDecorActionBar.java:198) at android.support.v7.app.WindowDecorAct
찾아보니 현재 테마를 맞추라는 내용이다.
나같은 경우에는 NoActionBar Theme여서 위의 오류가 발생해서, preview의 view theme를 NoActionBar로 해주니 해결되었다.