平常报错

1.添加fragment时出现java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.原因,第三个参数忘了加

protected View setLayoutView(LayoutInflater inflater, @Nullable ViewGroup container) {
        return inflater.inflate(R.layout.fragment_life_zipcode,container,false);
    }

 

posted @ 2017-12-25 16:22  西瓜皮不甜  阅读(138)  评论(0)    收藏  举报