Android开发:Android Studio Design界面不显示layout界面的解决方法

Android Studio更新到3.1.3后,发现拖到Design中的控件在预览界面中不显示;

解决办法:

在Styles.xml中的parent="..."中的Theme前添加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>

文章转自:u010264659的专栏

猜你喜欢

转载自blog.csdn.net/android157/article/details/81283950