Hardcoded string "Button", should use @string resource
来源:互联网 发布:淘宝客服售后面试问题 编辑:程序博客网 时间:2024/06/05 16:00
遇到这个错误是在写xml文件中一个button上的字的时候,书上就是这样写的
android:text="Button"
我就这样写了,可是就是出现了标题的警告。找了一些解决方法。不怎么好--是添加一个xml文件。
仔细分析出错信息就是它是在提醒怎么做的。找到这样简单有效的方法:
android:text="@string/Button"
就不再有警告了。
但是在我直接上用边的方法的时候,偶尔也会出现这种问题:
error: Error: No resource found that matches the given name (at 'text' with value '@string/Button1').
这个是java文件中写的有错误。
button1 = (Button)this.findViewById(R.id.button1);
里边的button1写成了button
- Hardcoded string "Button", should use @string resource
- Hardcoded string "Button", should use @string resource
- Hardcoded string "Button", should use @string resourc
- ADT中出现类似这样的错误:[I18N] Hardcoded string "button", should use @string resource.
- Hardcoded string "下一步", should use @string resource警告
- Hardcoded string "下一步", should use @string resource警告
- Hardcoded string 汉字, should use @string resource警告
- Hardcoded string XXX, should use @string resource警告
- Hardcoded string "XXXX", should use @string resource警告 解释
- Hardcoded string "下一步", should use @string resource警告
- “Hardcoded string "xxx", should use @string resource”警告
- 纯新手遇到 hardcoded string ... should use @string resource
- 【转】Hardcoded string XXX, should use @string resource警告
- Hardcoded string XXX, should use @string resource警告
- Hardcoded string "下一步", should use @string resource警告
- Warning:Hardcoded String"xxxx" should use @string resource
- Hardcoded string 汉字, should use @string resource警告
- !!:[I18N] Hardcoded string "Add", should use @string resource
- 自制X86操作系统(1)-系统引导篇3(保护模式)
- experiment : 用OD下消息断点, 捕获按钮操作.
- 单车到飞船
- button1 cannot be resolved or is not a field
- poj 2653 Pick-up sticks
- Hardcoded string "Button", should use @string resource
- MySQL的concat,concat_ws,group_concat
- VMware vSphere 服务器虚拟化之二十三 桌面虚拟化之创建手动虚拟桌面池
- 【解决办法】ubuntu server 版的 ISO文件,在 Ultra ISO 打开,内容不对,写入到 启动U盘,也不能引导系统
- IOS随笔
- 12 Amazing and Essential Linux Books To Enrich Your Brain and Library
- 软件定义网络的学习笔记--第一篇
- CareerCup 4.8
- LigerUi框架布局的随心所欲调整(实例)!