您的位置:首页 > 其它

安卓使用到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的包是一样的,
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: