android - Eclipse Android - list 中的解析器异常

标签 android eclipse adt ddms

我正在使用 ADT 在 Eclipse Juno 中开发适用于 Android 的应用程序。出于某种原因,我的程序突然出现错误(这很简单:我在菜单中添加了一些项目,仅此而已)并且由于某种原因,我的项目似乎出现了错误,因为尝试运行它导致失败,原因是我的项目包含错误。奇怪的是,我的菜单 XML 文件和我的主要 Activity 都没有显示任何错误,只是整个项目。这反过来会在我尝试清理我的项目时删除我的 R.java 文件。现在,当我尝试重新制作“图形”项目时,我在进行任何修改之前收到此 DDMS 错误:

[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for    /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - Graphics] Parser exception for /Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
 [2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
 [2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
 [2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
 [2012-08-08 14:54:25 - Graphics] Parser exception for /Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.

我现在不知道是什么原因造成的。我没有对我的库进行任何修改。在此之前,我在另一个工作区中运行测试很好。谁能解释一下这是怎么回事?

这是我的 list :

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.graphics"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
</application>

</manifest><manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.graphics"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
</application>

</manifest><manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.graphics"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/title_activity_main" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

</manifest>

这是我的主要布局,我在这里遇到了 yugidroid 的回答中提到的错误:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:text="@string/hello_world"
    tools:context=".MainActivity" />

</RelativeLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:text="@string/hello_world"
    tools:context=".MainActivity" />

</RelativeLayout>

最佳答案

我刚刚遇到了同样的问题,我想我已经弄清楚发生了什么。我有一个名为 Foo 的项目第一次运行时完全正常,但我删除了该项目(选中删除磁盘上项目内容的选项)。现在,当我创建另一个具有相同名称 (Foo) 的项目时,我得到了您在此处遇到的错误。实际上,如果您多次删除项目并重新创建它,它每次都会添加/复制整个 list 部分。

在您删除之前的某个时间,您是否碰巧有一个同名的项目(图形),然后又开始了一个同名的新项目?

关于android - Eclipse Android - list 中的解析器异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11873901/

相关文章:

c# - 使布局不可见Android

android - 获取 Android 设备支持的编解码器

android - 如何解决flutter_local_notifications PlatformException错误?

java - 当焦点状态改变时如何改变 "drawableLeft"?

eclipse - F5 刷新并不总是可用/在 Eclipse 中工作

java - 为什么 Eclipse Android IDE 在使用少量后变得如此缓慢和滞后?

java - 如何从 eclipse 调用两个或多个 ant 目标?

eclipse - 将 Tomcat 服务器连接到 Eclipse

android - ADT 和 Android SDK 有什么区别?

java - 在 Android 中显示移动 WordPress