I just filed an Android tools bug report<http://code.google.com/p/android/issues/detail?id=37631>on this:
The following users and I have seen this error crop up when using the Graphical Layout tab of the layout editor, even on the simplest and correct layouts. "Could not create tab content because could not find view with id -1" I'm seeing it in API20 when I including another xml file as a tab. If I copy and paste the contents of the include file, the error is not shown. See the following other reports of this error: http://stackoverflow.com/q/12338023/403455 http://stackoverflow.com/a/4807779/403455 (See comment on raybritton's proposed answer) https://groups.google.com/d/topic/android-developers/DRY4fsbwgDA/discussion On Monday, March 26, 2012 11:05:21 AM UTC-5, med Mehdi bettaieb wrote: > > i have problem in this file xml > > Could not create tab content because could not find view with id -1 > > <?xml version="1.0" encoding="utf-8"?> > <TabHost xmlns:android="http://schemas.android.com/apk/res/android" > android:id="@+id/tabs" android:layout_width="fill_parent" > android:layout_height="wrap_content"> > <LinearLayout android:orientation="vertical" > <?xml version="1.0" encoding="utf-8"?> > <TabHost xmlns:android="http://schemas.android.com/apk/res/android" > android:id="@+id/tabs" android:layout_width="fill_parent" > android:layout_height="wrap_content"> > <LinearLayout android:orientation="vertical" > android:layout_width="fill_parent" > android:layout_height="fill_parent"> > <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="wrap_content"> > <ScrollView android:layout_width="fill_parent" > android:layout_height="wrap_content"> > <include android:id="@+id/content1" > layout="@layout/tab_today" /> > </ScrollView> > <ScrollView android:layout_width="fill_parent" > android:layout_height="wrap_content"> > <include android:id="@+id/content2" > layout="@layout/tab_qibla" /> > </ScrollView> > </FrameLayout> > </LinearLayout> > </TabHost><?xml version="1.0" encoding="utf-8"?> > <TabHost xmlns:android="http://schemas.android.com/apk/res/android" > android:id="@+id/tabs" android:layout_width="fill_parent" > android:layout_height="wrap_content"> > <LinearLayout android:orientation="vertical" > android:layout_width="fill_parent" > android:layout_height="fill_parent"> > <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="wrap_content"> > <ScrollView android:layout_width="fill_parent" > android:layout_height="wrap_content"> > <include android:id="@+id/content1" > layout="@layout/tab_today" /> > </ScrollView> > <ScrollView android:layout_width="fill_parent" > android:layout_height="wrap_content"> > <include android:id="@+id/content2" > layout="@layout/tab_qibla" /> > </ScrollView> > </FrameLayout> > </LinearLayout> > </TabHost> > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en