Android 踩坑记录

一、java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.

Activity继承了兼容包中的类,查看主题是否来自 Theme.AppCompat

<style name="BaseTheme.Light" parent="Theme.AppCompat"

如果此处没有问题或者修改后仍抛出次异常  请检查引用的插件是否与我们自定义的主题有冲突 

二、  Caused by: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.

  

使用Toolbar 但是主题并未指定正确

<style name="BaseTheme.Light" parent="Theme.AppCompat.Light.NoActionBar">

评论

暂无评论