You need to use a Theme.AppCompat theme (or descendant) with this activity
来源:互联网 发布:华为杯网络比赛 编辑:程序博客网 时间:2024/05/18 03:56
一个小问题,顺手记录一下。
今天做项目的时候,有个小小的需求,就是让一个activity运行但不显示界面出来,网上找了一下,方法很简单,只需要在你的清单文件中,将该activity的主题改成如下即可:
android:theme="@android:style/Theme.NoDisplay"
但是当我运行的时候,报了一个错误:
You need to use a Theme.AppCompat theme (or descendant) with this activity
后来在stackoverflow上找到了答案:
意思是,你的这个activity是不是继承了v7包里的包装过的activity,比如他这里说的ActionBarActivity,如果是的话就改一下,我看了我的是继承了AppCompatActivity,然后改成Activity就可以了
0 0
- 关于“you need to use a theme.appcompat theme (or descendant) with this activity”错误
- Android开发~you need to use a theme.appcompat theme (or descendant) with this activity
- You need to use a Theme.AppCompat theme (or descendant) with this activity
- You need to use a Theme.AppCompat theme (or descendant) with this activity解决方法
- You need to use a Theme.AppCompat theme (or descendant) with this activity.
- You need to use a Theme.AppCompat theme (or descendant) with this activity解决方法
- 【Android】You need to use a Theme.AppCompat theme (or descendant) with this activity解决方法
- You need to use a Theme.AppCompat theme (or descendant) with this activity
- You need to use a Theme.AppCompat theme (or descendant) with this activity解决
- you need to use a theme.appcompat theme (or descendant) with this activity 解决办法
- You need to use a Theme.AppCompat theme (or descendant) with this activity.
- You need to use a Theme.AppCompat theme (or descendant) with this activity.
- You need to use a Theme.AppCompat theme (or descendant) with this activity解决方法
- You need to use a Theme.AppCompat theme (or descendant) with this activity.
- 报错 You need to use a Theme.AppCompat theme (or descendant) with this activity.
- Android Studio You need to use a Theme.AppCompat theme (or descendant) with this activity解决方法
- 关于You need to use a Theme.AppCompat theme (or descendant) with this activity的问题
- You need to use a Theme.AppCompat theme (or descendant) with this activity解决方法
- 前端面试题(1)
- 十三章 猜拳代码
- 13章 练习
- 英文词汇
- HDFS读写文件的java代码
- You need to use a Theme.AppCompat theme (or descendant) with this activity
- linux服务器环境的安装和配置
- HDU 5876 Sparse Graph(bfs+set)
- 十二星座
- 初入HTML
- web前端框架之----bootstrap
- HDU2844-Coins(多重背包)
- mysql 设置唯一性约束
- 《算法导论》 读书笔记 (二)