开发者

simple modification results in error

When I tried to do a simple modification of the "hello android" program that eclipse adt plugin generates I get error and can't get the program to run again even if I restore the file to its original contents. The modification was that I changed a string in strings.xml. the line was:

<string name="app_name">Todo List</string>

and the app was runnable, then I changed it to

<string name="app_name">Todo List1</string>

and it was an error:

[2010-04-21 23:18:03 - Todo_list] Error in an XML file: aborting开发者_开发技巧 build.

And a new empty file also showed up called: strings.out.xml And then I can't get the prrogram back into runnable state even if I delete the empyt file and restore the original line, I'm a confused beginner of java, android and eclipse.


This bug crops up on some machines when you build while focusing on an xml file in eclipse. To avoid this, always have focus on a .java file when building. In addition, always delete any .out files produced because you won't be able to build with them around.


This is because you ran the app when strings.out.xml file had focus s Eclipse tried to run that. Delete your strings.out.xml file, give your main app java file focus, then run again.


The answer is that you have to run the package and eclipse will, by default, try to run the currently open file. If you click the down arrow next to the run icon on the toolbar, you can select to run your package.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜