title: Android TabHost Example
body: <p>I did and run example. But i take error.</p>
  
  <pre><code>Error: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.tabmenu/com.example.tabmenu.MainActivity: java.lang.IllegalArgumentException: you must specify a way to create the tab indicator.
  </code></pre>
  
  <h3>mainActivity.java</h3>
  
  <pre class="lang-java prettyprint-override"><code>@SuppressWarnings("deprecation")
  public class MainActivity extends TabActivity {
  
      @Override
      public void onCreate(Bundle savedInstanceState)
      {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          TabHost tabHost = (TabHost)findViewById(android.R.id.tabhost);
  
          TabSpec tab1 = tabHost.newTabSpec("First Tab");
          TabSpec tab2 = tabHost.newTabSpec("Second Tab");
          TabSpec tab3 = tabHost.newTabSpec("Third Tab");
  
          tab1.setIndicator("Tab1");
          tab1.setContent(new Intent(this,Tab1Activity.class));
  
          tab1.setIndicator("Tab2");
          tab1.setContent(new Intent(this,Tab2Activity.class));
  
          tab1.setIndicator("Tab3");
          tab1.setContent(new Intent(this,Tab3Activity.class));
  
          tabHost.addTab(tab1);
          tabHost.addTab(tab2);
          tabHost.addTab(tab3);
      }
  }
  </code></pre>
  
  <h3>androidManifest.xml</h3>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.tabmenu"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="18" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
  
          &lt;activity 
              android:name="com.example.tabmenu.Tab1Activity"/&gt;
          &lt;activity
              android:name="com.example.tabmenu.Tab2Activity"/&gt;
          &lt;activity
              android:name="com.example.tabmenu.Tab3Activity"/&gt;
          &lt;activity
              android:name="com.example.tabmenu.MainActivity"
              android:label="@string/app_name" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>