如何运行 Android 开发者网站中给出的 xml pull 解析器示例
我正在尝试在 Eclipse 中运行 Android 开发人员网站中给出的示例代码。 http://developer.android.com/reference/org/xmlpull/v1 /XmlPullParser.html
但我无法运行它。我收到错误“import org.xmlpull.v1.XmlPullParserException.html”无法解析。
我下载了 jar(从 wwwExtreme.indiana.edu/xgws/xsoap/xpp/download/old_versions/)并将构建路径更改为 PullParser11.jar,但我仍然遇到相同的错误并且无法运行。
我是 Java 和 Android 新手,所以也许我犯了一个愚蠢的错误。请帮助我解决这个问题,以便我可以运行解析器代码。
感谢您的时间和帮助。
马杜
I am trying to run the sample code given in Android developer website in Eclipse.
http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html
But I am not able to run it. I get an error that "import org.xmlpull.v1.XmlPullParserException.html" cannot be resolved.
I downloaded the jar (from www extreme.indiana.edu/xgws/xsoap/xpp/download/old_versions/) and changed the build path to PullParser11.jar but I still get the same error and cannot run.
I am new to Java and Android so maybe I am making a silly mistake. Kindly help me with this problem so that I can run the parser code.
Thank you for your time and help.
Madhu
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来这只是一个令人讨厌的错字。 Android 网站上的代码会尝试从包
XmlPullParserException
中导入类html
,这是没有意义的。尝试删除.html
,应该没问题。It seems as if this is just a nasty typo. The code on the Android website would try to import the class
html
from the packageXmlPullParserException
which just doesn't make sense. Try removing the.html
and you should be fine.