按照官网的“Installing the SDK”安装的eclipse+ADT在编辑string.xml时,Android Resource Editor会报错“java.lang.NullPointerException”。
方法一:
对string.xml做简单修改。
<!-- 第二行原内容 --> <resources> ... <!-- 修改为 --> <resources xmlns:android="http://schemas.android.com/apk/res/android"> ...
方法二:
Windows -> Preferences -> XML -> XML Files -> Editor
然后把「Use infered grammar in absence of DTD/Schema」这个选项关掉,按 Apply。
重新开启 strings.xml 后就正常了。