2011-03-28 172 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:我只是想將上面的單詞設置爲註釋,但我不知道如何設置爲註釋,所以我只能設置爲另一個答案。