在strings.xml文件的resources标签前,加上 <!DOCTYPE resources [<!ENTITY appname "测试">]> 引用时通过 &appname <string name="app_name">&appname;</string>