java.lang.IllegalStateException..... at tabhost.add(tabspec);
<p>Hi guyzz I have TabActivity as following simple code</p>

<pre><code>public class TabhostActivity extends Activity{
    TabHost host;

    public class TabhostActivity extends Activity{
    TabHost host;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);

        setContentView(R.layout.tablayout);

        host = (TabHost) findViewById(R.id.mytabhost);

        host.setup();
        Intent intent = new Intent(getApplicationContext(), RatingBarActivity.class); 
        TabHost.TabSpec spec = host.newTabSpec("positions").setIndicator("Positions",getResources().getDrawable(R.drawable.add)).setContent(intent);

        host.addTab(spec);
        host.setCurrentTab(0);

    }
</code></pre>

<p>and has a simple tab layout as </p>

<pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" &gt;

    &lt;TabHost
        android:id="@+id/mytabhost"
        android:layout_width="match_parent"
        android:layout_height="match_parent" 
        android:padding="5dp"&gt;

        &lt;LinearLayout
            android:id="@+id/linearLayout1"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical" 
            android:padding="5dp"&gt;

            &lt;FrameLayout
                android:id="@android:id/tabcontent"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1" 
                android:background="#FF0000"&gt;

            &lt;/FrameLayout&gt;

            &lt;HorizontalScrollView
                android:id="@+id/horizontalScrollView1"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" &gt;

                &lt;TabWidget
                    android:layout_marginLeft="5dp"
                    android:id="@android:id/tabs"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:tabStripEnabled="true" &gt;
                &lt;/TabWidget&gt;
            &lt;/HorizontalScrollView&gt;
        &lt;/LinearLayout&gt;
    &lt;/TabHost&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>So please help me where the code is getting wrong?? I got exception as</p>

<blockquote>
  <p>02-23 14:09:47.920: E/AndroidRuntime(1000): Caused by: java.lang.IllegalStateException: Did you forget to call 'public void setup(LocalActivityManager activityGroup)'?</p>
</blockquote>
