您的位置:首页 > 其它

The specified child already has a parent. You must call removeView() on the child's parent first.

2015-09-23 18:37 423 查看
在使用fragmentActivity和fragment时,调用replace时出现Caused by: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.错误。

解决办法:

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {

View rootView = inflater.inflate(R.layout.fragment_exchange, container,
false);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: