message :
java.lang.RuntimeException: Unable to start activity ComponentInfo{패키지명.activity파일명}:
java.lang.RuntimeException: Your content must have a TabHost whose id attribute is 'android.R.id.tabhost'
solution :
Your content must have a TabHost whose id attribute is 'android.R.id.tabhost'
tabhost 가 설정된 xml 파일 소스 이상유무 확인
tabhost 가 설정된 java 파일 소스 이상유무 확인
explanation :
※ 내 경우, xml 만 생성해놓고 tabhost 설정이 아에 빠져있었다. 마저 기입하니 OK ^^;;
※ 참고! tabhost 은 api 11 이상부터 actionbar 로 바꿔 사용해야한다.
source :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width ="fill_parent"
android:layout_height = "fill_parent"
android:orientation="vertical" >
<TabHost
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
android:orientation="vertical"
android:layout_height="fill_parent"
android:layout_width="fill_parent" >
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight = "9" />
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
</TabHost>
</LinearLayout>