You need to use a Theme.AppCompat theme (or descendant) with this activity. Change to Theme.AppCompat causes other error

前端 未结 14 940
Happy的楠姐
Happy的楠姐 2020-11-27 15:47

I use appcompat v22.1.0 in my App and use Toolbar. Everything was fine when I use Theme.AppCompat.Light.NoActionBar. When I start implement AlertDialog

14条回答
  •  隐瞒了意图╮
    2020-11-27 16:38

    In my case, I had to check and make sure that all styles.xml files use Theme.AppCompat. The standard styles.xml file had that theme but there were also styles(v21).xml, styles(v11).xml and styles(sw600dp).xml that were auto-generated. The simple solution would be to copy and paste the customized default AppTheme style into these folders.

    All the best!

提交回复
热议问题