title: Unexpected cast to TabHost: Layout tag was Linear Layout
body: <p>I try to create a tabHost as in the following code.</p>
  
  <pre><code>    TabHost tabs = (TabHost) findViewById(R.id.homeTabs);
      tabs.setup();
  
      // Search
      TabHost.TabSpec tabSearch = tabs.newTabSpec("search");
      tabSearch.setContent(R.id.tabSearch);
      tabSearch.setIndicator("Search");
      tabs.addTab(tabSearch);
  
      // Notification
      TabHost.TabSpec tabNotification = tabs.newTabSpec("notification");
      tabNotification.setContent(R.id.tabNotification);
      tabNotification.setIndicator("Notification");
      tabs.addTab(tabNotification);
  </code></pre>
  
  <p>and its xml code is</p>
  
  <pre><code>&lt;TabHost
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:id="@+id/tabHost"
      android:layout_alignParentTop="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true"&gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:orientation="vertical"
          android:id="@+id/homeTabs"&gt;
  
          &lt;FrameLayout
              android:id="@android:id/tabcontent"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"&gt;
  
              &lt;LinearLayout
                  android:id="@+id/tabNotification"
                  android:layout_width="fill_parent"
                  android:layout_height="fill_parent"
                  android:orientation="vertical"&gt;&lt;/LinearLayout&gt;
  
              &lt;LinearLayout
                  android:id="@+id/tabSearch"
                  android:layout_width="fill_parent"
                  android:layout_height="fill_parent"
                  android:orientation="vertical"
                  android:layout_gravity="center"&gt;
  
              &lt;/LinearLayout&gt;
  
          &lt;/FrameLayout&gt;
      &lt;/LinearLayout&gt;
  &lt;/TabHost&gt;
  </code></pre>
  
  <p></p>
  
  <p>AndroidStudio shows the error tip "Unexpected cast to TabHost: Layout tag was Linear Layout" on the line</p>
  
  <pre><code>TabHost tabs = (TabHost) findViewById(R.id.homeTabs);
  </code></pre>
  
  <p>While running this app, it quits and shows this error</p>
  
  <p>FATAL EXCEPTION: main java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.nisfansabith.policia/com.example.nisfansabith.policia.Home}: java.lang.ClassCastException: android.widget.LinearLayout</p>