如何关闭警告在Eclipse @string资源为Android SDK [英] How to turn off warnings for @string resource in eclipse for the Android SDK

查看:309
本文介绍了如何关闭警告在Eclipse @string资源为Android SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这是技术上不是最好的做法是硬编码字符串;但我可以稍后再处理它 - 现在我只想得到我的项目的壳完成,我居然强迫症有关我的code警告 - ?有没有办法关闭这个功能。

如果我的标题是不够具体以此为例子:

 <按钮机器人:ID =@ + ID / aboutBtn
        风格=@风格/ DashboardButton
        机器人:文字颜色=#FFFFFF
        机器人:文字=关于Vezign
        安卓的onClick =aboutClick
        机器人:drawableTop =@绘制/ about_icon/>

Android的:文字=行会被标记为不使用的strings.xml和参考它作为这样的警告

preferably东西会关闭它为未来的所有引用;而不是我需要键入(例如@燮preSS警告)

谢谢!


解决方案

  preferences> Android和GT;林特错误检查>

滚动到国际

改变的严重性硬codedText 到信息或忽略

I know it's 'technically' not the best practice to be hard coding strings; but I can deal with it later - right now I just want to get the shell of my projects finished and I'm incredibly OCD about warnings in my code - is there any way to turn this off?

If my title wasn't specific enough take this as an example:

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

The android:text="" line would be flagged as a warning for not using strings.xml and referencing it as such.

Preferably something that would turn it off for all future references; and not something I need to type (e.g. @Suppress Warnings)

Thanks!

解决方案

 Preferences > Android > Lint Error Checking > 

Scroll down to internationalization

change the severity of "HardcodedText" to 'information' or 'ignore'

这篇关于如何关闭警告在Eclipse @string资源为Android SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆