XML文档结构必须在同一实体内开始和结束 [英] XML document structure must start and end within the same entity

查看:137
本文介绍了XML文档结构必须在同一实体内开始和结束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Eclipse来说是个新手,我才刚开始写一些代码(实际上只是从网站上复制和粘贴)有人可以帮我吗???*错误显示在最后一行

I'm quite a newbie for the eclipse, and I'm just started to write some code(actually it's just copy and paste from the website) can anyone help me about this??? *the error is appear on the last line

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:orientation="vertical" >

    <ToggleButton
        android:id="@+id/toggleButton1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        >

    </ToggleButton>

推荐答案

使用以下代码:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:orientation="vertical" >

    <ToggleButton
        android:id="@+id/toggleButton1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        >

    </ToggleButton>
</LinearLayout>

这篇关于XML文档结构必须在同一实体内开始和结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆