android studio laylayout编辑器出错
来源:2-2 选择题
qq_哦呼_0
2018-09-02 19:47:43
编辑layout文件的时候,模拟显示器没有显示东西
出现这个错误
The following classes could not be instantiated:
- android.support.v7.widget.ActionBarContainer (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)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE. If this is an unexpected error you can also try to build the project, then manually refresh the layout. Exception Details java.lang.ClassNotFoundException: android.view.View$OnUnhandledKeyEventListener Copy stack to clipboard
还有这个:
Failed to load AppCompat ActionBar with unknown error. Tip: Try to refresh the layout.
2回答
irista23
2018-09-04
在AndroidManifest.xml文件中找到application样式文件Theme
对应找到styles.xml文件,将AppTheme改成如下红框中的,或者修改成Base.Theme.AppCompat.Light
好帮手慕雪
2018-09-03
build the project然后再刷新一下xml文件。log提示是加载AppCompat ActionBar出现了一个未知的错误,需要刷新一下layou页。或者你把ActionBar相关删掉。祝:学习愉快
相似问题