The specified child already has a parent. You must call removeView() on the child's parent first
来源:互联网 发布:js头像上传功能插件 编辑:程序博客网 时间:2024/04/29 08:12
学习android 的 fragment时遇到The specified child already has a parent. You must call removeView() on the child's parent first的错误,
提示已经有父容器,通过调试一直是fragmentTransaction.commit();的错误,后来知道是fragment中的问题
View view = inflater.inflate(R.layout.activity_content, container);
原来这里默认绑定了一个container的容器,所以调用commit时提示已经有了父容器,只需改成
View view = inflater.inflate(R.layout.activity_content, container, false);
默认不绑定就可以了
0 0
- The specified child already has a parent. You must call removeView() on the child's parent first.
- 二、The specified child already has a parent. You must call removeView() on the child's parent first.
- The specified child already has a parent. You must call removeView() on the child's parent first
- The specified child already has a parent. You must call removeView() on the child's parent first
- The specified child already has a parent. You must call removeView() on the child's parent first.
- The specified child already has a parent. You must call removeView() on the child's parent first.
- The specified child already has a parent. You must call removeView() on the child's parent first
- The specified child already has a parent. You must call removeView() on the child's parent first.
- 总是报The specified child already has a parent. You must call removeView() on the child's parent first.
- The specified child already has a parent. You must call removeView() on the child's parent first.解决办
- The specified child already has a parent. You must call removeView() on the child's parent first.
- The specified child already has a parent. You must call removeView() on the child's parent first.
- The specified child already has a parent. You must call removeView() on the child's parent first.
- The specified child already has a parent. You must call removeView() on the child's parent first
- The specified child already has a parent. You must call removeView() on the child's parent first.问解决
- The specified child already has a parent. You must call removeView() on the child's parent first.
- The specified child already has a parent. You must call removeView() on the child's parent first.
- The specified child already has a parent. You must call removeView() on the child's parent first.
- 开通博客
- 很多都不知道
- MathType 换行后无法对齐,怎么都对不齐!!!强迫症晚期(见图)
- awk中抓取IP地址
- “你求婚我买单”许下一生承诺弘阳广场惊现浪漫求婚派对
- The specified child already has a parent. You must call removeView() on the child's parent first
- 移动互联网广告营销人必备5种大数据工具
- 交通灯管理系统
- 石门县落实早稻面积7.2万亩 政府“买单”补贴粮食大户
- c语言----值传递、值引用
- 政府买单让群众乐享“文化盛宴”
- 撒旦撒旦
- 射频去鱼尾纹后会出现哪些不良现象
- C Language Study - 关于内存对齐