启动 Android 程序时出错 [英] Error starting an Android program

查看:48
本文介绍了启动 Android 程序时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<前>[2010-04-16 23:31:34 - MobileDataKeeper] XML 文件中的错误:中止构建.[2010-04-16 23:31:57 - MobileDataKeeper] XML 文件中的错误:中止构建.[2010-04-16 23:32:28 - MobileDataKeeper] XML 文件中的错误:中止构建.[2010-04-16 23:34:56 - MobileDataKeeper] XML 文件中的错误:中止构建.[2010-04-16 23:35:14 - MobileDataKeeper] res/layout/main.out.xml:0: 错误:资源条目 main 已定义.[2010-04-16 23:35:14 - MobileDataKeeper] res/layout/main.out.out.xml:0:最初定义在这里.[2010-04-16 23:35:14 - MobileDataKeeper] res/layout/main.xml:0: 错误:资源条目 main 已定义.[2010-04-16 23:35:14 - MobileDataKeeper] res/layout/main.out.out.xml:0:最初定义在这里.[2010-04-16 23:35:14 - MobileDataKeeper]/media/Mis Documentos/Dropbox/Eclipse/MobileDataKeeper/res/layout/main.out.out.xml:1:错误:解析 XML 时出错:未找到元素[2010-04-16 23:35:14 - MobileDataKeeper]/media/Mis Documentos/Dropbox/Eclipse/MobileDataKeeper/res/layout/main.out.xml:1:错误:解析 XML 时出错:未找到元素[2010-04-16 23:35:49 - MobileDataKeeper] XML 文件中的错误:中止构建.

Main.xml.out.* 为空.MobileDataKeeper.java 是默认的,Mainx.xml 输出是:

每次我更改 Main.xml 中的某些内容时都会遇到此问题.这非常令人沮丧,我不知道发生了什么.需要训练有素的眼睛!

谢谢!

解决方案

删除项目中的所有 main.xml.out 文件.然后,不要不要尝试使用 XML 文件作为 Eclipse 编辑器中的活动选项卡运行项目 -- 切换到 Java 文件.尝试使用 XML 文件作为活动选项卡运行项目,从而创建了那些 .out 文件并弄乱了系统.

可能有更复杂的解决方法,但我不是 Eclipse 用户,所以我不知道它是什么.

[2010-04-16 23:31:34 - MobileDataKeeper] Error in an XML file: aborting build.
[2010-04-16 23:31:57 - MobileDataKeeper] Error in an XML file: aborting build.
[2010-04-16 23:32:28 - MobileDataKeeper] Error in an XML file: aborting build.
[2010-04-16 23:34:56 - MobileDataKeeper] Error in an XML file: aborting build.
[2010-04-16 23:35:14 - MobileDataKeeper] res/layout/main.out.xml:0: error: Resource entry main is already defined.
[2010-04-16 23:35:14 - MobileDataKeeper] res/layout/main.out.out.xml:0: Originally defined here.
[2010-04-16 23:35:14 - MobileDataKeeper] res/layout/main.xml:0: error: Resource entry main is already defined.
[2010-04-16 23:35:14 - MobileDataKeeper] res/layout/main.out.out.xml:0: Originally defined here.
[2010-04-16 23:35:14 - MobileDataKeeper] /media/Mis Documentos/Dropbox/Eclipse/MobileDataKeeper/res/layout/main.out.out.xml:1: error: Error parsing XML: no element found
[2010-04-16 23:35:14 - MobileDataKeeper] /media/Mis Documentos/Dropbox/Eclipse/MobileDataKeeper/res/layout/main.out.xml:1: error: Error parsing XML: no element found
[2010-04-16 23:35:49 - MobileDataKeeper] Error in an XML file: aborting build.

Main.xml.out.* are empty. The MobileDataKeeper.java is default and the Mainx.xml out is:

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout
    android:id="@+id/RelativeLayout01"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    xmlns:android="http://schemas.android.com/apk/res/android" />

Every time i change something in the Main.xml get this problem. It's very frustrating and I don't know what the heck is going on. A trained eye is requiered!

Thanks!

解决方案

Delete all main.xml.out files in your project. Then, do NOT attempt to run the project with an XML file as the active tab in the editor in Eclipse -- switch to a Java file. It is the attempt to run the project with an XML file as the active tab that creates those .out files and messes up the system.

There's probably a more sophisticated workaround, but I am not an Eclipse user, so I do not know what it is.

这篇关于启动 Android 程序时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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