Eclipse, ADT, strings.xml and java.lang.NullPointerException
July 22nd, 2010
On a clean installation of Eclipse and the Android Development Tools (ADT), and for a new Android project, when trying to edit the strings.xml file, a java.lang.NullPointerException is thrown.
To fix the problem, edit strings.xml directly, bypassing the GUI, by double clicking the file in the Eclipse workbench, then selecting strings.xml from the tab at the bottom. Then, replace the line that reads:
<resources>
with
<resources xmlns:android="http://schemas.android.com/apk/res/android">
August 3rd, 2010 at 9:27 PM
First off, thank you for the tip! I got tired of trying to type a single letter and then acknowledge the error.
Secondly, how and why does this work and will I need to do this with every project that I create?
August 18th, 2010 at 7:34 PM
This was very helpful, thank you! May I second Chris Stahl’s question and ask how this fixed the problem?
August 24th, 2010 at 8:43 PM
Thank you!
How did you find out about this though?
August 24th, 2010 at 10:16 PM
Had the same issue before and I found the fix because I had a sample project that the error didnt happen to and noticed that xmlns attribute. Im guessing the poster noticed it the same way.
September 9th, 2010 at 5:09 PM
Until then, go to the XML/XML Files/Editor preference page and turn
off the “Use inferred grammar…” setting. It should only affect
content assist and possibly some of the Outline view and Design page’s
context menu actions. Or refer to a DTD or XML Schema in the XML
file. We’ll have this corrected in Helios SR1/WTP 3.2.2.
October 24th, 2011 at 10:27 PM
Very useful data concerning these subject. I’ve found them with googling and also you seems number one of the subjects ! . . .
December 21st, 2011 at 6:53 PM
how to catch a cheating spouse said on November 24th, 2011 at 5:57 pm
January 9th, 2012 at 12:32 PM
I loved the post! really enjoyed it, If you need a hand with your SEO just let me know
January 9th, 2012 at 4:15 PM
Wonderful goods from you, man. I’ve understand your stuff previous to and you’re just too magnificent. I really like what you’ve acquired here, certainly like what you’re saying and the way in which you say it. You make it entertaining and you still take care of to keep it sensible. I can’t wait to read much more from you. This is actually a great web site.
January 20th, 2012 at 10:55 AM
Hi, XxFRYwc viagra generico