有效的XML文件给出"无法解析"在Android的ADT错误错误、有效、文件、XML

由网友(能不能不感染你得过去°)分享简介:我已经做了一个XML文件:I have made a XML file:我已经做了一个XML文件:

I have made a XML file:

<?xml version="1.0" encoding="utf-8"?>
<selector
    xmlns:android="http://schemas.android.com/apk/res/android">
  <item
    android:state_pressed="true"
   android:drawable="@drawable/calender_h" />
  <item
   android:state_pressed="false"
  android:drawable="@drawable/calender_n" />  
</selector>

但它给我以下错误:

but it is giving me the following error:

解析失败文件G: eclipseHeliosWorkspace WineCountry 水库绘制 calendar_selector.xml

Failed to parse file G:eclipseHeliosWorkspaceWineCountryresdrawablecalendar_selector.xml

这可能是什么问题?

推荐答案

我不知道它是相同的,但 更新到ADT 15时,在库项目类似的问题发生在我身上。 这是谷歌的问题,目前仍在开: 21046 。

I'm not sure it's the same, but Similar issue happened to me when updating to ADT 15, in a library project. this is the google issue that currently still opened: 21046.

这是为我工作:

删除项目库声明。 打开布局导致错误的图形布局(其中使用选择的)。 清洁项目(项目 - >清洁) 关闭并重新打开蚀。 (布局现在应该是确定) 您可以重新设置该项目作为库。 Remove the library declaration of the project. Open the layout causing the error (the one which using the selector) in graphical layout. Clean the project (Project -> Clean) Close and reopen eclipse. (the layout should be ok now) You can set the project as library again.

希望这有助于! (如果它仍然适用?)

Hope this helps! (if it's still relevant...)

阅读全文

相关推荐

最新文章