首页 > 其他 > 详细

fragment The specified child already has a parent. You must call removeView()

时间:2015-04-10 17:13:49      阅读:397      评论:0      收藏:0      [点我收藏+]

在切换Fragment的时候出现:The specified child already has a parent. You must call removeView()异常。

错误主要出在Fragment中的oncreateview方法中。

可能引起错误的写法:

View view = inflater.inflate(R.layout.indexfragment_layout, container);

  正确写法:

View view = inflater.inflate(R.layout.indexfragment_layout, container,
				false);

  具体原因暂不详,希望知道的同学告知一下,谢谢。

fragment The specified child already has a parent. You must call removeView()

原文:http://www.cnblogs.com/tony-yang-flutter/p/4414902.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!