解决Android报错No resource found that matches the given name (at 'text' with value '@string/hello').

解决Android项目No resource found that matches the given name (at 'text' with value '@string/hello').

如图,此时需在res/values/strings.xml中resource中加  

 1 <string name="hello"></string> 

 我的strings.xml代码如下

1 <?xml version="1.0" encoding="utf-8"?>
2 <resources>
3 
4     <string name="app_name">SharedPreferencesProjuect1</string>
5     <string name="action_settings">Settings</string>
6     <string name="hello_world">Hello world!</string>
7     <string name="hello"></string>
8 
9 </resources>
原文地址:https://www.cnblogs.com/huipin/p/8684580.html