java.lang.RuntimeException: Unable to start activity ComponentInfo……AppCompat does not support the current theme features
Android测试时出现闪退的问题,出现了如下所示异常:
java.lang.RuntimeException: Unable to start activity ComponentInfo{thonlon.example.cn.livetelecast/thonlon.example.cn.livetelecast.MainActivity}: java.lang.IllegalArgumentException: AppCompat does not support the current theme features: { windowActionBar: false, windowActionBarOverlay: false, android:windowIsFloating: false, windowActionModeOverlay: false, windowNoTitle: false }
启动不了应用的原因有很多,这里只是其中一例,这里的问题解决方式是:
在style.xml:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<!--<item name="android:windowNoTitle">true</item>-->
<!--<item name="windowActionBar">false</item>-->
</style>
</resources>
中不要禁用默认主题的头部布局……(不要加入这样的代码)
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
java.lang.RuntimeException: Unable to start activity ComponentInfo……AppCompat does not support the current theme features的更多相关文章
- 转载java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.spinner/com.example.spinner.MainActivity}: java.lang.NullPointerException
今天学习Android开发突然遇到了这个问题,查阅了很多资料,并且对集中原因进行了分析. 错误信息字符串:java.lang.RuntimeException: Unable to start act ...
- Java.lang.RuntimeException: Unable to instantiate activity ComponentInfo
如果你更新了ADT的新版本,而工程文件中使用了其他的jar包,也可能会出现"java.lang.RuntimeException: Unable to instantiate activit ...
- java.lang.RuntimeException: Unable to instantiate activity ComponentInfo异常总结
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo异常总结 做android开发的可能都碰到"j ...
- java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ex.activity/com.ex.activity.LoginActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ex.activity/com.ex.activity.L ...
- java.lang.RuntimeException: Unable to start activity ComponentInfo
异常:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.william/com.william.Result ...
- Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}
Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPoi ...
- android studio调试报错:java.lang.RuntimeException: Unable to start activity ComponentInfo
报错信息: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.pro_u_loc/com.e ...
- java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.love5/com.example.love5.Main11Activity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.
若有 java.lang.RuntimeException和 java.lang.NullPointerException: Attempt to invoke virtual method 'voi ...
- Android java.lang.RuntimeException: Unable to instantiate activity ComponentInfo 特殊异常
本来是不想写的,因为这个异常太常见了,而且也容易处理.但是还是决定记录一下,因为之前遇到过,没留心,今天又遇到了,苦逼了,想了好大一会儿才想起来. 通常容易找的就不写了,今天写个特殊的. 现象:当你在 ...
随机推荐
- fedora23 桌面工具栏fedy, 桌面美化 allow: 2'lau不是2'l2u
## Sudoers allows particular users to run various commands as ## the root user, without needing the ...
- fedora安装了phpmyadmin后, mariadb无法启动?
参考:http://www.linuxidc.com/Linux/2015-10/123945.htm where, which, when,等不但可以用在从句中, 而且可以用在 动词不定式中, 如: ...
- luogu P5105 不强制在线的动态快速排序
前言 考试的时候居然想错了区间贡献,mdzz 思路 题目看着很方啊,难道要树套树? 但数据范围提醒我们,是nlogn的复杂度 Sort(S)的定义是不是很鬼畜 但我们不动脑子的打表容易发现 连续区间[ ...
- SpringBoot2.0之整合Apollo
Spring Boot客户端对接阿波罗服务器端 核心源码都在这个压缩包里面 封装好了环境 运行shell脚本就ok了 下面进入到本地maven仓库: 远程仓库apollo的jar包 只能打包到本地或者 ...
- orcl 之 导入和导出(2)
删除用户表,表数据等内容 drop user username cascade 无法为表空间 spancename 中的段创建INITAL区处理办法 找到表空间存储的地方文件 select file_ ...
- [HDU 2520] 我是菜鸟,我怕谁(不一样的for循环)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2520 //学学不一样的for循环 #include<iostream> #include& ...
- QT中QLineEdit的editingFinished()信号在按下回车时会触发两次的解决办法
class MyLineEdit : public QLineEdit { Q_OBJECT public: MyLineEdit(QWidget * parent = 0) : QLineEdit( ...
- JavaScript获取星期几的几种方法
星期几的4种JS代码写法,有需要的朋友可以参考一下 第一种写法 代码如下: var str = ""; var week = new Date().getDay(); if ( ...
- tcpdump使用方法
TcpDump可以将网络中传送的数据包完全截获下来提供分析.它支持针对网络层.协议.主机.网络或端口的过滤,并提供and.or.not等逻辑语句来帮助你去掉无用的信息. 工作中使用tcpdump命令抓 ...
- 4、Python文件对象及os、os.path和pickle模块(0530)
文件系统和文件 1.文件系统是OS用于明确磁盘或分区上的文件的方法和数据结构---即在磁盘上组织文件的方法: 文件系统模块:os 2.计算机文件(称文件.电脑档案.档案),是存储在某种长期储存设备或临 ...