- 總遇到androidstudio,視圖在androidstudio中顯示不出來,而且報Failed to load AppCompat ActionBar with unknown error,原因是styles.xml中默認的AppTheme有問題,它默認是這個,需要增加Base
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
變成
<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>