xml parser error in notepadv1 tutorial

可紊 提交于 2019-12-13 03:32:32

问题


I am working on the notpadv1 tutorial. I get an error from the parser as soon as I create a new xml file called note_row.xml and put in the following code: The error is at the end of the file. It says: multiple annotations found at this line premature end of file error parsing XML:no element found

I also see the following error in the console: [2010-07-04 05:34:32 - Notepadv1] Error in an XML file: aborting build.

I am following the instructions in step 5 of the following url: http://developer.android.com/resources/tutorials/notepad/notepad-ex1.html


回答1:


You have a bug in one of your XML resource files, such as a layout. It is impossible to say, from the error information you have shown here, where exactly your problem lies. There should be a line prior to the one you show in the console that would explain to you which file has a problem and what the problem is. If not, examine your files in Eclipse and look for warning or error squiggles.




回答2:


Thanks. The issue was with the file type. I created a regular file, while I needed a xml file. Instead of file > new , I used file > new > other then selected xml. That fixed it. I need to be able to make better sense of the error messages. If you can suggest a document, or tutorial I would greatly appreciate it.




回答3:


This is a weird error, yet not able to find the rootCause. But whenever this happens,

I cut my xml code from file, save it; Then paste whole code back in file, and save it again. Error goes away. I don't even consider this a solution. But it works.

A link to THIS THREAD may help.



来源:https://stackoverflow.com/questions/3174327/xml-parser-error-in-notepadv1-tutorial

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!