04-01 18:46:03.279: E/AndroidRuntime(3077): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.testtab2/com.example.testtab2.MainActivity}: 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) {
// TODO Auto-generated method stub
return inflater.inflate(R.layout.test_tab1, container,false);
}
inflater.inflate(R.layout.test_tab1, container,false);你的false沒有設定!!
沒有留言:
張貼留言