新手开发tabhost的时候

新手开发tabhost的时候求助
布局文件:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <TabHost android:layout_width="fill_parent"
             android:layout_height="fill_parent"
             android:id="@+id/thid">
        
    </TabHost>
    <TextView android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:id="@+id/tv1"
             android:text="text1"/>
    <TextView android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:id="@+id/tv2"
             android:text="text2"/>
    <TextView android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:id="@+id/tv3"
             android:text="text3"/>
</RelativeLayout>

activity:
 public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_tabspace);
        
        tabHost = (TabHost)this.findViewById(R.id.thid);
        
        
        
        ts1 = tabHost.newTabSpec("tab1");
        ts2 = tabHost.newTabSpec("tab2");
        ts3 = tabHost.newTabSpec("tab3");
        
        ts1.setContent(R.id.tv1);//这执行这行代码的时候报错
        ts2.setContent(R.id.tv2);
        ts3.setContent(R.id.tv3);
        
        tabHost.addTab(ts1);
        tabHost.addTab(ts2);
        tabHost.addTab(ts3); 
    }

报错信息:

11-01 12:26:28.085: E/AndroidRuntime(299): FATAL EXCEPTION: main
11-01 12:26:28.085: E/AndroidRuntime(299): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.flp.control/com.flp.control.TabspaceActivity}: java.lang.NullPointerException
11-01 12:26:28.085: E/AndroidRuntime(299):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
11-01 12:26:28.085: E/AndroidRuntime(299):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
11-01 12:26:28.085: E/AndroidRuntime(299):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
11-01 12:26:28.085: E/AndroidRuntime(299):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
11-01 12:26:28.085: E/AndroidRuntime(299):  at android.os.Handler.dispatchMessage(Handler.java:99)
11-01 12:26:28.085: E/AndroidRuntime(299):  at android.os.Looper.loop(Looper.java:123)
11-01 12:26:28.085: E/AndroidRuntime(299):  at android.app.ActivityThread.main(ActivityThread.java:4627)
11-01 12:26:28.085: E/AndroidRuntime(299):  at java.lang.reflect.Method.invokeNative(Native Method)
11-01 12:26:28.085: E/AndroidRuntime(299):  at java.lang.reflect.Method.invoke(Method.java:521)
11-01 12:26:28.085: E/AndroidRuntime(299):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-01 12:26:28.085: E/AndroidRuntime(299):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-01 12:26:28.085: E/AndroidRuntime(299):  at dalvik.system.NativeStart.main(Native Method)
11-01 12:26:28.085: E/AndroidRuntime(299): Caused by: java.lang.NullPointerException
11-01 12:26:28.085: E/AndroidRuntime(299):  at android.widget.TabHost$ViewIdContentStrategy.<init>(TabHost.java:586)
11-01 12:26:28.085: E/AndroidRuntime(299):  at android.widget.TabHost$ViewIdContentStrategy.<init>(TabHost.java:581)
11-01 12:26:28.085: E/AndroidRuntime(299):  at android.widget.TabHost$TabSpec.setContent(TabHost.java:438)
11-01 12:26:28.085: E/AndroidRuntime(299):  at com.flp.control.TabspaceActivity.onCreate(TabspaceActivity.java:27)