android - XML 文件问题

标签 android xml

我一直在尝试创建一个 xml 文件,将相对布局集成到选项卡式布局中。这是我的代码:

<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" /> 
            <RelativeLayout 
                android:id="@+id/simpleMode
                android:orientation="vertical"                
                android:layout_width="fill_parent" 
                android:layout_height="wrap_content">            

            </RelativeLayout>       
        </LinearLayout>
</TabHost>

我收到了很多错误,但我似乎无法找到我的问题所在: 我的错误是 Relative Layout must be followed by > or/> 和 在 android:id="@+id/simpleMode

找不到与给定名称匹配的追索权

如有任何帮助,我们将不胜感激,非常感谢!!

最佳答案

请注意你在 android:id="@+id/simpleMode 之后丢失了 "。所以你的 xml 文件出错了。只需放置并运行

关于android - XML 文件问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6751940/

相关文章:

Android youtube/gdata api 在运行 proguard 后不工作

xml - 使用 Google Analytics 跟踪 XML Web 服务上的点击次数

c# - 为什么 "i"被替换为 "ı"

xml - Xpath 计数非空后代

java - 如何在 Volley 上发送请求 Header 是 "Content-Type":"application/json"

android 解析 sdk 与 Facebook sdk

java - Webview 在 android 2.2 中加载 html 而不是 android 2.1

python - 如何序列化作为 XML Exporter 中的项目列表的 Scrapy 字段

xml - XML 文件的替代文件扩展名?

android - 更新后如何重启自包