A factory has already been set on this LayoutInflater
来源:互联网 发布:ubuntu chroot修复引导 编辑:程序博客网 时间:2024/06/03 19:09
AppCompatActivity 已经设置过了,源代码如下:
public void installViewFactory() { LayoutInflater layoutInflater = LayoutInflater.from(mContext); if (layoutInflater.getFactory() == null) { LayoutInflaterCompat.setFactory(layoutInflater, this); } else { if (!(LayoutInflaterCompat.getFactory(layoutInflater) instanceof AppCompatDelegateImplV9)) { Log.i(TAG, "The Activity's LayoutInflater already has a Factory installed" + " so we can not install AppCompat's"); } }}解决方法有两种,第一:继承Activity替代AppCompatActivity
第二:在super.oncreate()之前设置,如下,但这种可能存在问题,可以看大神的
http://blog.csdn.net/lmj623565791/article/details/51503977SkinInflateFactory skinInfateFactory=new SkinInflateFactory();LayoutInflaterCompat.setFactory(LayoutInflater.from(this),skinInflateFactory);super.onCreate(savedInstanceState);
0 0
- A factory has already been set on this LayoutInflater
- getOutputStream() has already been called for this
- The Activity's LayoutInflater already has a Factory installed so we can not install AppCompat's
- Sharepoint 2013-A feature with ID has already been installed in this farm
- SharePoint 2013: A feature with ID has already been installed in this farm
- 树莓派GPIO接口命名规则 A different mode has already been set解决方案
- 安装jre时:This software has already been installed on your computer. Would you like to reinstall”
- java_lang_IllegalStateException getOutputStream() has already been called for this response
- getOutputStream() has already been called for this response 的解决方法
- Illegal access: this web application instance has been stopped already
- getOutputStream() has already been called for this response
- getOutputStream() has already been called for this response的解决方法
- getOutputStream() has already been called for this response 异常处理
- getOutputStream() has already been called for this response
- getOutputStream() has already been called for this response
- getOutputStream() has already been called for this response
- getOutputStream() has already been called for this response 的解决方法
- getOutputStream() has already been called for this response
- CSS中常用字体
- 由编译警告引起的程序错误
- NRF24L01+
- BZOJ 3680 吊打XXX
- linux下的c库函数
- A factory has already been set on this LayoutInflater
- leetcode
- php根据ip来进行流量统计
- WEUI.Uploader
- 计算代码段运行时间(openCV版)
- 长按power key的流程分析
- iOS编译集成linux开源c库的一些记录
- 隐私政策
- FastReport.NET系列-------导出PDF格式,页面无法显示完全