Android's strings.xml giving a nullpointer on retrieval.
Perhaps one of you great gods/goddesses of Android may see it fit to help a mere peasent as myself.
If I use
String myNewAppId = "34";
I am 开发者_开发技巧good. If I use
String myNewAppId = this.getString(R.string.appid);
or
String myNewAppId = getResources.getString(R.string.appid);
setting my strings.xml file to
<string name="appid">34</string>
I show no errors yet I crash with a nullpointerException.
Sometimes Eclipse does not update the string resource. Try cleaning and rebuilding your project manually to force it to be updated.
精彩评论