java.lang.IllegalStateException: You need to use a Theme.AppCompat theme
来源:互联网 发布:网络上赌博赢了5千万 编辑:程序博客网 时间:2024/06/06 03:53
翻译自:http://stackoverflow.com/questions/21814825/you-need-to-use-a-theme-appcompat-theme-or-descendant-with-this-activity
中Bobbake4的回答:
The reason you are having this problem is because the activity you are trying to apply the dialog theme to is extending ActionBarActivity
which requires the AppCompat
theme to be applied.
Change the Java inheritance from ActionBarActivity
to Activity
and leave the dialog theme in the manifest as it is.
ActionBarActivity
改成Activity
。错误截图如下:
0 0
- java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this a
- java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this a
- java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this a
- java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this a
- java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this a
- java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this a
- java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this a
- java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this a
- java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this a
- eclipse:java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) wit
- Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant)
- DiaLogUtils报错java.lang. IllegalStateException You need to use a Theme.AppCompat theme
- Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant)
- Android去標題時報錯:java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendan
- Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant)
- java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this
- java.lang.IllegalStateException: You need to use a Theme.AppCompat theme
- java.lang.IllegalStateException: You need to use a Theme.AppCompat theme
- POI+JFreeChart生成报表图片插入到Excel中
- Android Gradle 看这一篇就够了
- 小知识点记录
- 冷热数据分离注意的问题
- PHP中使用PDO操作MySQL
- java.lang.IllegalStateException: You need to use a Theme.AppCompat theme
- 前端点击图片将跳出显示框显示图片
- 【转】Netty那点事(三)Channel中的Pipeline
- JEM帧内预测:Cross-component linear model prediction(CCLM)
- RecyclerView 边框线设置
- 字符串
- css中IE判断语句 if !IE
- SQL如何查询一个数据库中的所有表?
- web项目+Struts2+Mybatis