解决The following classes could not be found:XXX问题

Rendering Problems

The following classes could not be found: - android.support.v7.internal.app.WindowDecorActionBar (Fix Build Path, Create Class)

Tip: Try to build the project.

解决办法:

这个问题的原因是studio成长中,Actionbar已经out了,它推荐你使用的是toolbar

解决方法1:

找到项目目录res/values/styles.xml,准备修改其中的AppTheme设置。
找到属性parent="Theme.AppCompat.Light.DarkActionBar改成parent="Base.Theme.AppCompat.Light.DarkActionBar",就是在原parent属性值上加“Base.”前缀。

修改成之后的截图:

 

ok啦    在返回你的布局文件时候  问题就没啦

解决方法2:更改下api版本 如图  换个低版本的api就可以了

 

 

解决方法3:跟方法一类似 ,只是把parent的值改成其他的,改成Theme.AppCompat.Light.NoActionBar

解决方法4:导入有效的android.support.v7.internal.app.WindowDecorActionBar 包

猜你喜欢

转载自ch-kexin.iteye.com/blog/2282097