有关Unable to start activity ComponentInfo的一点BUG
来源:互联网 发布:淘宝813 编辑:程序博客网 时间:2024/05/29 08:17
问题描述
Unable to start activity ComponentInfo{}: **无法启动 造成问题原因 1 .路径不对 2 清单文件没注册 3.theme不对..以下提示**java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.**重点内容**如果用了AppCompatActivity或者ActionbarActivity 在这里面用到了toolbar 就要使用NoActionBar主题,或者使用去ActionBar属性下面将是两种方式
1.直接继承noactionbar
<style name="AppTheme.NotActionBar" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/primary</item> <item name="colorPrimaryDark">@color/primary_dark</item> </style>
2.用代码去掉actionbar的属性
<style name="Theme.AppCompat.Light.DarkActionBar"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style>
3.自定义style
<style name="AppTheme.NoActionBar"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style>
当然除此之外可能还有 如果继承了AppCompatActivity 就必须使用AppCompat下的theme这也是造成无法启动的原因之一
0 0
- 有关Unable to start activity ComponentInfo的一点BUG
- Unable to start activity ComponentInfo
- Unable to start activity ComponentInfo
- Unable to start activity ComponentInfo
- Unable to start activity ComponentInfo
- Android中的"Unable to start activity ComponentInfo"或者"Unable to instantiate activity ComponentInfo"的错误
- Android中的"Unable to start activity ComponentInfo"或者"Unable to instantiate activity ComponentInfo"的错误
- 一个新的原因造成Unable to start activity ComponentInfo
- Unable to start activity ComponentInfo 解决方法
- Unable to start activity ComponentInfo 解决方法
- Unable to start activity ComponentInfo 解决方法
- RuntimeException:Unable to start activity ComponentInfo
- 自定义SurfaceView Unable to start activity ComponentInfo
- Unable to start activity ComponentInfo 解决方法
- Unable to start activity ComponentInfo 解决方法
- 出现Unable to start activity ComponentInfo 解决办法
- 关于Unable to start activity ComponentInfo异常
- Unable to start activity ComponentInfo 解决方法
- group by
- 分治算法---归并排序
- unity [serializefiled]序列化
- 关闭 火狐 关闭标签时 动画效果
- n皇后,2n皇后
- 有关Unable to start activity ComponentInfo的一点BUG
- Java核心技术 卷一 笔记十 参数传递设计的调用
- 使用虚拟沙箱安装Tensorflow
- [bzoj3743][Coci2015]Kamp
- HDU3397区间合并 延迟标记
- 栈的基本操作
- 关于IP遇到的坑
- ML2 配置 OVS VxLAN
- python学习语法