加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

java – 找不到符合给定名称的资源(在’text’,值为’@ string /

发布时间:2020-12-15 00:08:05 所属栏目:Java 来源:网络整理
导读:让我开始说我是全新的 Android编程.我正在使用Pragmatic的Hello Android书(第3版).我正在研究流行的数独游戏示例,在将要放置在main.xml文件中的代码复制代码之后,我收到以下错误: error: Error: No resource found that matches the given name (at 'backgr
让我开始说我是全新的 Android编程.我正在使用Pragmatic的Hello Android书(第3版).我正在研究流行的数独游戏示例,在将要放置在main.xml文件中的代码复制代码之后,我收到以下错误:
error: Error: No resource found that matches the given name (at 'background' with value '@color/background')
.
error: Error: No resource found that matches the given name (at 'text' with value '@string/main_title').

error: Error: No resource found that matches the given name (at 'text' with value '@string/continue_label').

error: Error: No resource found that matches the given name (at 'text' with value '@string/new_game_label').

error: Error: No resource found that matches the given name (at 'text' with value '@string/about_label').

error: Error: No resource found that matches the given name (at 'text' with value '@string/exit_label').

他们可能都是相关的,但在进行一些搜索之后,我不知道是什么问题.有什么建议么?

解决方法

错误说的一切.你有一个res文件夹,你的资源像字符串/图像/布局可以驻留.你是引用资源,但它们不存在.你正在引用about_label字符串,但在你的字符串xml没有标签为string about_label及其值.请参阅res-> strings.Check您的所有xml文件,并将您尝试使用的资源放入程序中

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读