想用Tab
拉了个TabHost放在xml布局文件上。提示:
rror during post inflation process:
TabHost requires a TabWidget with id "android:id/tabs".
View found with id 'tabs' is 'com.android.layoutlib.bridge.MockView'The following classes could not be found:
- TabWidget (Change to android.widget.TabWidget, Fix Build Path, Edit XML)
xml的graphic layer也看到效果了,xml文件中@android:id/tabhost android:id/tabs @android:id/tabcontent都有啊这个错误是什么意思,我该怎么解决呢?
拉了个TabHost放在xml布局文件上。提示:
rror during post inflation process:
TabHost requires a TabWidget with id "android:id/tabs".
View found with id 'tabs' is 'com.android.layoutlib.bridge.MockView'The following classes could not be found:
- TabWidget (Change to android.widget.TabWidget, Fix Build Path, Edit XML)
xml的graphic layer也看到效果了,xml文件中@android:id/tabhost android:id/tabs @android:id/tabcontent都有啊这个错误是什么意思,我该怎么解决呢?
注意中间个没有“@”
另外你不把代码贴出来 很难猜滴
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/weatherset">
<TabHost android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:layout_width="fill_parent" android:id="@+id/linearLayout1" android:layout_height="fill_parent" android:orientation="vertical">
<TabWidget android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@android:id/tabs"></TabWidget>
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@android:id/tabcontent">
<LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/tab1"></LinearLayout>
<LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/tab2"></LinearLayout>
<LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/tab3"></LinearLayout>
</FrameLayout>
</LinearLayout>
</TabHost>
</LinearLayout>graphical layer视图提示如下错误:
rror during post inflation process:
TabHost requires a TabWidget with id "android:id/tabs".
View found with id 'tabs' is 'com.android.layoutlib.bridge.MockView'The following classes could not be found:
- TabWidget (Change to android.widget.TabWidget, Fix Build Path, Edit XML)
我上次也这个,是不是就这样,然后就重启,就又好了。
在onCreate里面都出错
super.onCreate(savedInstanceState);
setContentView(R.layout.weatherset);提示遇到错误。
You can attach the source by clikcing Attach Source Below......这是什么意思啊。我运行其他的android程序都好好的,唯独有tabhost的时候就出这样的错误。