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 特殊异常
本来是不想写的,因为这个异常太常见了,而且也容易处理.但是还是决定记录一下,因为之前遇到过,没留心,今天又遇到了,苦逼了,想了好大一会儿才想起来. 通常容易找的就不写了,今天写个特殊的. 现象:当你在 ...
随机推荐
- oracle数据库数据库表空间查询及扩充
1.查询表空间,及表空间的大小 SELECT t.tablespace_name, round(SUM(bytes / (1024 * 1024)), 0) ts_size FROM dba_tabl ...
- Selenium Webdriver弹出框的种种类型
普通弹出框 div 一般这种 弹出框都属于dom的一部分,我们查看一下页面源码就可以定位到改弹出框了,然后定位下右上角的那个关闭, 这里有id,所以很方便通过 dr.findElement(By.id ...
- JDK8新特性:使用Optional避免null导致的NullPointerException
空指针异常是导致Java应用程序失败的最常见原因.以前,为了解决空指针异常,Google公司著名的Guava项目引入了Optional类,Guava通过使用检查空值的方式来防止代码污染,它鼓励程序员写 ...
- Ubuntu18.04 一些好用的扩展
原文:https://www.lulinux.com/archives/2589 一些好用的扩展: United:https://www.gnome-look.org/p/1167950/ dynam ...
- shell编程中的单/双 小括号, 中括号, 大括号
linux shell中的变量类型?分字符串或者数字或者bool类型吗? 参考: http://www.cnblogs.com/nufangrensheng/p/3477281.html 不分! sh ...
- bitset,2018蓝桥杯-明码(二进制转换)
bitset可以存储二进制数位 bitset<8> x(2); cout<<x<<endl; //输出:00000010 #include <iostream ...
- FJUT3565 最大公约数之和(容斥)题解
题意:给n,m,求出 思路:题意为求出1~m所有数和n的gcd之和.显然gcd为n的因数.我们都知道gcd(a,b)= c,那么gcd(a/c,b/c)= 1.也就是说我们枚举n所有的因数k,然后去找 ...
- oracle 之 包,包体创建和使用案例
先创建包,再创建包体---------------创建包体--------------------- create or replace package body pkg_yygl_service I ...
- myCat知识笔记
数据字典做成全局表(在各个分库中都有备份) ER表, 关联表都放在同一个分库上, 有利于数据关联查询 一致性hash ,/hash slot 主要为了解决分布式节点扩容时, 迁移数据的问题. mySq ...
- Kubernetes命令
kubectl applykubectl getkubectl set image deployment/xxx -n ns echoservice=xxxkubectl deletekubectl ...