android - Upgraded to AppCompat v22.1.0 and now getting IllegalArgumentException: AppCompat does not support the current theme features -


i've upgraded app use newly released v22.1.0 appcompat , i'm getting following exception when open app.

caused by: java.lang.illegalargumentexception: appcompat not support current theme features         @ android.support.v7.app.appcompatdelegateimplv7.ensuresubdecor(appcompatdelegateimplv7.java:360)         @ android.support.v7.app.appcompatdelegateimplv7.setcontentview(appcompatdelegateimplv7.java:246)         @ android.support.v7.app.appcompatactivity.setcontentview(appcompatactivity.java:106) 

how fix it?

appcompat more strict on expect in theme window flags, more closely matching framework.

the main reason behind support appcompatdialogs adding in release. make heavy use of windownotitle flag, appcompat didn't pay attention to.

so fix issue have 2 options:

the easy way use theme.appcompat.noactionbar parent theme. right thing.

if can't though (maybe need support action bar , no action bar), should following:

<style name="mytheme" parent="theme.appcompat">     ... </style>  <style name="mytheme.noactionbar">     <!-- both of these needed -->     <item name="windowactionbar">false</item>     <item name="windownotitle">true</item> </style> 

you should on track now.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -