android启动Dialog风格Activity报错:java.lang.IllegalStateException: You need to use a theme.appcompat theme
来源:互联网 发布:优化人才管理是什么 编辑:程序博客网 时间:2024/06/07 05:31
文章出处:http://blog.csdn.net/dq1005/article/details/51326668
错误描述:java.lang.IllegalStateException: You need to use a theme.appcompat theme (or descendant) with this activity
产生原因:Activity继承自AppCompatActivity而不是Activity,在style.xml中使用了不兼容的Theme。
从错误提示中提到Theme.AppCompat theme,这是因为我们的activity一定是继承了兼容包中的类,
比如我这里就无意中继承了AppCompatActivity,它来自android.support.v7.app.AppCompatActivity。
所以就要使用与其配合的AppCompat的theme才行。
解决方法:
1、使用AppCompat theme;
2、直接继承自Activity。
阅读全文
0 0
- android启动Dialog风格Activity报错:java.lang.IllegalStateException: You need to use a theme.appcompat theme
- DiaLogUtils报错java.lang. IllegalStateException You need to use a Theme.AppCompat theme
- Android去標題時報錯:java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendan
- android 引入ActionBar报错Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat t
- 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)
- Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant)
- 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
- Linux系统tomcat自动安装shell脚本
- 事件冒泡onmouse(move、out、over、enter、leave)
- 解决Jquary隐藏页面元素后再显示时样式不起作用
- <!---->与/**/注释问题
- Android---静态fragment简单
- android启动Dialog风格Activity报错:java.lang.IllegalStateException: You need to use a theme.appcompat theme
- Address already in use: JVM_Bind:8080
- 133. Clone Graph
- 数组的最大子序列之和
- 解决org.apache.rat:apache-rat-plugin:0.8:check (default) on project hbase: Too many unapproved license
- FutureTask使用demo
- 51nod 1007 正整数分组 背包思路题
- html/css移动界面侧滑效果
- 简单的滚动条事件