2011-03-28 165 views
1

在android.util.Config中,现在不推荐使用Config.LOGD,Config.LOGV。你能告诉我如何重构我的代码,以摆脱编译器生成的警告?Config.LOGD已弃用

谢谢。

回答

0

您应该使用Config.DEBUG(在调试模式下为true)而不是Config.LOGD。

+0

Config.DEBUG何时会为true,何时会为false?它是否由Manifest文件确定?谢谢。 – michael 2011-03-28 22:30:00

0

是的,Robby的意思是它。请参阅开源代码的说明。

public final class Config 
{ 
    /** 
    * If this is a debug build, this field will be true. 
    */ 
    public static final boolean DEBUG = ConfigBuildFlags.DEBUG; 

PS:我只是想将上面的单词设置为注释,但我不知道如何设置为注释,所以我只能设置为另一个答案。