安卓使用到ActionBar的时候遇到的两个bug,做一下总结
2015-07-14 09:54
337 查看
getActionBar();为null
解决方法:在styles.xml中appbasetheme改为 <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
01-01 08:25:44.905: E/AndroidRuntime(4562): android.view.InflateException: Binary XML file line #6: Error inflating class fragment
01-01 08:40:04.680: E/AndroidRuntime(5845): Caused by: android.app.Fragment$InstantiationException: Trying to instantiate a class com.example.iplatlayout.lightControlFragment that is not a Fragment
初始化fragment必须保证import的包是一样的,
解决方法:在styles.xml中appbasetheme改为 <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
01-01 08:25:44.905: E/AndroidRuntime(4562): android.view.InflateException: Binary XML file line #6: Error inflating class fragment
01-01 08:40:04.680: E/AndroidRuntime(5845): Caused by: android.app.Fragment$InstantiationException: Trying to instantiate a class com.example.iplatlayout.lightControlFragment that is not a Fragment
初始化fragment必须保证import的包是一样的,
相关文章推荐
- 在Python中使用Redis数据库
- HDU 1548 A strange lift
- kettle实现文本文件数据抽取方法
- AD域和LDAP协议
- 线程之间共享数据(两个线程之间使用同一份数据),线程锁要统一,不统一的话会出现线程安全问题
- char TCHAR WCHAR区别 与 转换
- NSError 之 code 对照表
- HDU 1728 逃离迷宫
- poj 2479 最大连续子段和
- .net 服务器端文件下载
- Mysql主从配置,实现读写分离
- Android版xx助手之天天酷跑外挂详细分析
- 自动调整linux系统时间和时区与Internet时间同步
- Grails开发环境的快速搭建
- WET Dilutes Performance Bottlenecks
- 服务器.htaccess 详解以及 .htaccess 参数说明
- cef network-settings
- C# in depth (第一章 C#开发的进化史)
- LeetCode:Single NumberⅡ
- libevent安装及使用