Possible Duplicate:
Anyone know what this error mean for android tabs?Tabhostチュートリアルが壊れていますか?
私はSDKでTabHostチュートリアルを実行しようとしていましたが、何らかの理由で破損しているようです。ステップ4でXMLコードをコピーして貼り付けると、正しく膨張しないようにするエラーが表示されます。エラーは次のとおりです。
Error in an XML file: aborting build.
これはXMLファイルのグラフィカルレイアウトです。
Error during post inflation process:
TabHost requires a TabWidget with id "android:id/tabs",
View found with id "tabs" is 'com.android.layoutlib.bridge.MockView'
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"
android:padding="5dp">
<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"
android:padding="5dp" />
</LinearLayout>
</TabHost>
何か問題がありますか?
これをテストプロジェクトなどで実行していますか? TabViewクラスが 'com.android.layoutlib.bridge.MockView'によって上書きされているようです。私は前にそのエラーを見たことがない。 – Falmarri
テストプロジェクトはありません。私はcom.android.layoutlib.bridge.MockViewがどこにあるか分からない。私が欲しかった。 –
[ここ](http://stackoverflow.com/questions/4963773/anyone-know-what-this-error-mean-for-android-tabs/5017740#5017740)は同じ質問の答えです。 – ercu