tags:

views:

68

answers:

1

06-14 00:21:30.398: ERROR/AndroidRuntime(332): Caused by: java.lang.RuntimeException: Your content must have a TabHost whose id attribute is 'android.R.id.tabhost'

what it means? I've already given the id for tabhost.And I can see the id in R.java.

Here is the .xml:

TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp"
TabWidget
android:id="@+id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
FrameLayout
android:id="@+id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp"
LinearLayout
TabHost

+1  A: 

If you are going to use TabActivity, you need to use @android:id/tabhost as the android:id value of your TabHost.

CommonsWare
I've tried this :(.
Kooper
@Kooper: Then you had a different error message. The message you have in your question is solved by the answer that I have given. Here is some sample code: http://developer.android.com/resources/tutorials/views/hello-tabwidget.html
CommonsWare