java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
在adapter里如下面代码这么写即可解决
@Override
public Object instantiateItem(ViewGroup view, int position) {if(list.get(position).getParent()==null){
view.addView(list.get(position));
}else{
((ViewGroup)list.get(position).getParent()).removeView(list.get(position));
view.addView(list.get(position));
}
return list.get(position);
}