解决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>

 

相关文章:

  • 2021-09-10
  • 2021-12-16
  • 2021-05-09
  • 2021-06-27
  • 2021-07-22
  • 2022-01-09
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2021-10-19
  • 2021-06-29
相关资源
相似解决方案