On Sun, Jun 19, 2011 at 2:55 PM, Gabe S <[email protected]> wrote: > The easiest way I found is to set your target build API to 11 (Android 3.0) > and change your graphical layout view to Android 3.0 while you are working > with the tab xml file. It's a bug that is supposed to be fixed for the > older versions but they haven't had to time yet.
There should be no need to touch the target build API -- this bug is only affected by the Rendering Target selection. As of ADT 11 the selection is made project wide, so once you've selected it for one of your layouts, switching to another layout in the same project will also use the new rendering target (this was not the case in previous releases, which meant that it would often default back to your project SDK version, which is why in the past changing the project SDK version might have helped, but that can have have some unintended consequences so don't do that just to deal with this bug.) -- Tor > On Sun, Jun 19, 2011 at 12:44 PM, Simon Platten > <[email protected]> wrote: >> >> I am trying to create a layout using the TabHost and TabWidge views as >> described here: >> >> >> http://developer.android.com/resources/tutorials/views/hello-tabwidget.html >> >> My XML so far looks like this: >> >> <?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 >> xmlns:android="http://schemas.android.com/apk/res/android" >> android:orientation="vertical" >> android:isScrollContainer="true" >> android:layout_width="fill_parent" >> android:layout_height="fill_parent" >> android:layout_gravity="center_horizontal" >> android:gravity="center_horizontal" >> android:background="@drawable/bg"> >> <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> >> >> However, the graphical layout shows the following error: >> >> 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' >> >> The following classes could not be found: >> - TabWidget >> >> I've made sure eclipse and the SDK is all up to date, so what am I >> missing? >> >> Thank you, >> >> -- >> Regards, >> Sy >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

