Android Studio Layout中不能显示布局控件的问题

问题情况:

更新AS3.1.2后今天打开项目发现布局文件中的控件不显示,preview右上角显示有错误:Render problem;Failed to instantiateone or more classes——The following classes could not be instantiated。如图所示:


解决方法:

在values->styles.xml中把

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">

加上Base,写为:

 <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">

问题解决:


虽然问题解决,但是原理不是很明白,希望有大神解释一下(;´д`)ゞ

猜你喜欢

转载自blog.csdn.net/narcissusnumber/article/details/81174548
今日推荐