Android的编程对我来说是新的.因此,日食也是新的.我一直在努力创造小东西.但是我发现每个例子都需要在main.xml中编辑.
我的问题是,每当我使用该文件时,我都会收到错误.我不知道是什么原因造成的.我不知道怎么摆脱它.
我试图在youtube上关注guid.遵循它的意义.仍然,得到错误.
有没有人知道导致这个问题的原因是什么?更重要的是:如何解决?
[2012-03-26 12:12:40 - No XML] emulator-5554 disconnected! Cancelling 'cyperia.noXML.NoXMLActivity activity launch'!
[2012-03-26 12:12:52 - No XML] Error in an XML file: aborting build.
[2012-03-26 12:13:00 - No XML] res\layout\main.xml:0: error: Resource entry main is already defined.
[2012-03-26 12:13:00 - No XML] res\layout\main.out.xml:0: Originally defined here.
[2012-03-26 12:13:00 - No XML] C:\Users\Illum\workspace\No XML\res\layout\main.out.xml:1: error: Error parsing XML: no element found
[2012-03-26 12:13:01 - No XML] 'default' is not a best match for any device/locale combination.
[2012-03-26 12:13:01 - No XML] Displaying it with 'Locale Language ___Region __, sw320dp, w320dp, h533dp, Normal Screen, Long screen aspect ratio, Portrait Orientation, Normal, Day time, High Density, Finger-based touchscreen, Soft keyboard, No keyboard, Exposed navigation, Trackball navigation, Screen resolution 800x480, API Level 15' which is compatible, but will actually be displayed with another more specific version of the layout.
[2012-03-26 12:13:02 - No XML] Error in an XML file: aborting build.
Run Code Online (Sandbox Code Playgroud)
这是使用Eclipse进行Android开发的长期问题.当您使用打开为"当前文档"的.xml文件运行/调试项目时,会看到此消息.Eclipse尝试构建xml文件而不是项目,因此抛出了神秘的错误.
一个快速的解决方法是在运行/调试项目之前导航到.java文件.
您也可以从工作区中选择项目来运行/调试它,但它需要更多的点击.
| 归档时间: |
|
| 查看次数: |
3545 次 |
| 最近记录: |