Android Studio Design界面不显示layout控件的解决方法

发现更改了 layout里面的xml文件后  切换到design后,没有显示控件

解决方法

解决办法:

在 res/values/styles.xml 文件中  将原有的 前面添加 Base.

Theme.AppCompat.Light.DarkActionBar 


如下图所示
<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>
原文地址:https://www.cnblogs.com/Draymonder/p/9601874.html