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">
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?
This was very helpful, thank you! May I second Chris Stahl’s question and ask how this fixed the problem?
Thank you!
How did you find out about this though?
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.
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.
Very useful data concerning these subject. I’ve found them with googling and also you seems number one of the subjects ! . . .
how to catch a cheating spouse said on November 24th, 2011 at 5:57 pm
I loved the post! really enjoyed it, If you need a hand with your SEO just let me know
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.
Hi, XxFRYwc viagra generico
I’ve look at several decent products below. Without a doubt price bookmarking for revisiting. I surprise the amount of concentration you put for making such an amazing instructive website.
The very heart of your writing while sounding reasonable in the beginning, did not settle well with me after some time. Someplace within the paragraphs you actually managed to make me a believer unfortunately only for a short while. I nevertheless have got a problem with your jumps in logic and one might do well to fill in those gaps. In the event you actually can accomplish that, I could certainly end up being fascinated.