Android Studio xml文件无法预览

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://mp.csdn.net/postedit

更新as到3.0.1后 布局文件的Design无法预览布局,显示空白

在网上找到个办法:

修改res/values/styles.xml文件中name=“AppTheme”的style,在Theme.AppCompat.Light.DarkActionBar前面添加Base.如下所示:

<resources> <!-- Base application theme. --> <style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style> </resources>

就又能显示布局文件了,记录下这些骚操作

 

猜你喜欢

转载自blog.csdn.net/qq_32425789/article/details/83107811
今日推荐