【Android】Do not requestWindow.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your th
来源:互联网 发布:七天网络阅卷查分下载 编辑:程序博客网 时间:2024/05/22 12:33
Caused by: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not requestWindow.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.
今天新建了一个activity并在activity里面设置这句话
setSupporActivity(toolbar);
然后就上面这个错误了。
分析可能是因为在application节点中引用了 @style/AppTheme样式,而这个样式自带actionbar
所以我们在activit里面 setSupporActivity(toolbar)就会报这个错误。
解决办法:
去掉代码中的setSupporActivity(toolbar);使用application 的样式
或在清单文件中 activity节点下加入
android:theme="@style/AppTheme.NoActionBar"
阅读全文
0 0
- 【Android】Do not requestWindow.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your th
- Do not request Window.FEATURE_ACTION_BAR and set windowActionBar to false 错误
- method to The entitlements specified in your application’s Code Signing Entitlements file do not mat
- Google to Android Developers: 'Do Not Develop in the Open'
- 51 You have not configured Oracle Managed Files (OMF) in your database. You do not want to scan the
- ERROR: date.timezone not set in php.ini. Please contact your hosting company to set the timezone in
- How to do android emma coverage test in your own ant scipts
- AppCompat does not support the current theme features: { windowActionBar: false, windowActionBarOver
- toolbar使用时显示AppCompat does not support the current theme features: { windowActionBar: false, windowA
- Android PSI and index do not match
- warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for re
- warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for re
- Android Do not do binder operation in destructor
- Parcelable - How to do that in Android
- Error: JAVA_HOME not found in your environment. Please set the JAVA_HOME variable in your environmen
- How to set bmp for your UserControl in the toolbox
- How to Set Up Your Own Home Seedbox (in Windows)
- do not try to modified the value in const region
- HashMap和Hashtable的区别
- form表单提交前验证
- 数据倾斜
- linux下 pppoe通过直接设置配置文件方式进行拨号
- vscode 升级1.18遇到Cannot find type definition file for 'node'
- 【Android】Do not requestWindow.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your th
- 【图解】共模干扰,差模干扰
- javascript中的各种事件说明
- python3 安装tensorflow
- 控制器加载的玄机
- RAC 集群 连接的时候报错 ora-12541
- MYSQL的COMMIT和ROLLBACK
- 关于verilog-2001标准中signed类型的reg/wire
- 安装PHP没想象中那么难