首页 > 技术文章 > 安卓preview不显示的问题

henanleon 2018-10-05 10:43 原文

 

 

Render Problem

Failed to load AppCompat ActionBar with unknown error

 

 

解决方法:将styles.xml文件中的:

 

<resources>

修改:
<!-- Base application theme. -->
<style name="AppTheme" parent="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>


修改后:
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
</style>

</resources>

完美解决问题!

 

推荐阅读