Problème avec l'affichage des TabHost Mise en page dans le new Intention

Je rencontre un problème avec l'utilisation de TabHost dans une nouvelle Intention de type TabActivity qui, je l'espère, vous pouvez me pointer dans la bonne direction. Curieusement, il fonctionne très bien lorsque je tente de l'afficher dans l'Intention originale : setContentView(R. layout.principal)

Je reçois un "forcé fermé" et à l'intérieur de logcat, j'obtiens l'erreur suivant, même si mon Tabhost id = "@android:id/tabhost":

02-18 22:23:11.937:
ERREUR/AndroidRuntime(5944): Causé par:
java.lang.RuntimeException: Votre
contenu doit avoir un TabHost dont l'id
un attribut est 'android.R.id.tabhost'

Je l'ai déclaré à la seconde intention dans le Manifest.xml fichier:
XML:

<activity android:name=".NextActivity" android:label="@string/app_name" > 

À l'intérieur de la première activité (MainActivity), je commence la deuxième intention (NextActivity), avec des extras, comme suit:

Intent nextActivity = new Intent(MainActivity.this,NextActivity.class); 
Bundle b_next=new Bundle(); 

b_next.putString("s_string", myString); 

nextActivity.putExtras(b_next); 

Dans mon NextActivity.java fichier, je reçois les extras et essayez d'afficher le TabHost Vue:

public class NextActivity extends TabActivity { 
     @Override 
     public void onCreate(Bundle savedInstanceState) { 
        super.onCreate(savedInstanceState); 

        String myString; 
        Bundle b_initial; 

        b_initial = getIntent().getExtras(); 

        myString = b_initial.getString("s_string"); 

     setContentView(R.layout.main); 

        } 
}

Je reçois la même erreur avec l'aide de la TabHost exemple sur l'Android Developer site (Hellow Vue):

Main.xml:

<?xml version="1.0" encoding="utf-8"?> 
<TabHost xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@android: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"> 
        <TabWidget 
            android:id="@android:id/tabs" 
            android:layout_width="fill_parent" 
            android:layout_height="wrap_content" /> 
        <FrameLayout 
            android:id="@android:id/tabcontent" 
            android:layout_width="fill_parent" 
            android:layout_height="fill_parent"> 
            <TextView 
                android:id="@+id/textview1" 
                android:layout_width="fill_parent" 
                android:layout_height="fill_parent" 
                android:text="this is a tab" /> 
            <TextView 
                android:id="@+id/textview2" 
                android:layout_width="fill_parent" 
                android:layout_height="fill_parent" 
                android:text="this is another tab" /> 
            <TextView 
                android:id="@+id/textview3" 
                android:layout_width="fill_parent" 
                android:layout_height="fill_parent" 
                android:text="this is a third tab" /> 
        </FrameLayout> 
    </LinearLayout> 
</TabHost>

Merci d'avance les gens...

De PRÉCISIONS:
C'est ce que j'ai vraiment de LogCat:

java.lang.NullPointerException
au android.widget de.TabHost.dispatchWindowFocusChanged(TabHost.java 285)
au android.vue.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java 640)
au android.vue.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java 640)
au android.vue.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java 640)
au android.vue.ViewRoot.handleMessage(ViewRoot.java 1645)
au android.os.Gestionnaire d'.dispatchMessage(Handler.java 99)
au android.os.Looper.boucle(Looper.java 123)
au android.app.ActivityThread.principale(ActivityThread.java 3948)
à java.lang.de réfléchir.La méthode.invokeNative(Native
La méthode)
à java.lang.de réfléchir.La méthode.invoke(Method.java 521)
au com.android.interne.os.ZygoteInit$MethodAndArgsCaller.exécuter(ZygoteInit.java 782)
au com.android.interne.os.ZygoteInit.principale(ZygoteInit.java 540)
à dalvik.système.NativeStart.principale(langue Maternelle
La méthode)

Je ne vois aucune référence à TabHost.addTab; bien qu'il ne semble pas que cela seul suffit à provoquer l'erreur, l'absence de ce code est suspect.

OriginalL'auteur | 2010-02-19