android - 如何在 Android SDK 的 eclipse 中关闭@string 资源的警告

标签 android eclipse warnings

我知道“技术上”不是硬编码字符串的最佳实践;但我可以稍后处理它 - 现在我只想完成我的项目的外壳,我对代码中的警告非常强制症 - 有什么办法可以关闭它吗?

如果我的标题不够具体,请以此为例:

        <Button android:id="@+id/aboutBtn"
        style="@style/DashboardButton"
        android:textColor="#ffffff"
        android:text="About Vezign"
        android:onClick="aboutClick"
        android:drawableTop="@drawable/about_icon" />

android:text=""行将被标记为不使用 strings.xml 并照此引用它的警告。

最好是可以将其关闭以供将来引用的东西;而不是我需要输入的内容(例如@Suppress Warnings)

谢谢!

最佳答案

 Preferences > Android > Lint Error Checking > 

向下滚动到国际化

将“HardcodedText”的严重性更改为“信息”或“忽略”

关于android - 如何在 Android SDK 的 eclipse 中关闭@string 资源的警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8958266/

相关文章:

java - 如何以编程方式检测 eclipse 插件命令的键绑定(bind)?

php - 有什么方法可以显示或抛出 PHP 警告吗?

Android:签名用于发布和调试的 apk 文件之间没有区别

javascript - react 原生 "Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)"

python - 为什么我的 python 程序在 eclipse/pydev 中调试这么慢?

eclipse - 单步执行光标/行 Eclipse 调试器

c++ - 警告 C26451 : Arithmetic overflow

warnings - 如何使用模式匹配检测 Ocaml 中的交换模式?

android - 刚刚发布的第一个应用程序。它在我的运行 4.2 的 Nexus 4 上运行良好,但 friend 说它在她运行 4.1 的 Electrify M 摩托罗拉上摇晃时崩溃

android - android 浏览器支持哪些音频格式?