Could not create tab content because could not find view with id

redoffice 2012-08-21 04:30:56
以下是代码,为什么会报这个错误。实在搞不懂。
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:id="@+id/tabhost">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true">
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent">


<LinearLayout
android:id="@+id/LinearLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="24px"
android:text="Layout1" />
</LinearLayout>
<LinearLayout
android:id="@+id/LinearLayout2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="24px"
android:text="LinearLayout2" />
</LinearLayout>
<LinearLayout
android:id="@+id/LinearLayout3"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="24px"
android:text="LinearLayout3" />
</LinearLayout>


</FrameLayout>
</TabWidget>
</LinearLayout>
</TabHost>
...全文
396 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
sada09 2012-08-21
  • 打赏
  • 举报
回复
这样用应该很少吧!暂时没搞清楚为什么?顶起来讨论
wintergoes 2012-08-21
  • 打赏
  • 举报
回复
楼主,赶快结贴吧~~
redoffice 2012-08-21
  • 打赏
  • 举报
回复
工具?这是我写的。怎么用工具?
中才德创 2012-08-21
  • 打赏
  • 举报
回复
这个文件的修改,一般不要手工修改,而是用工具吧。这样出错的概率少许些。
redoffice 2012-08-21
  • 打赏
  • 举报
回复
顶下,删除framelayout下的三个linearlayout,就没错了。

80,471

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧