1
A
回答
0
您應該使用Config.DEBUG(在調試模式下爲true)而不是Config.LOGD。
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:我只是想將上面的單詞設置爲註釋,但我不知道如何設置爲註釋,所以我只能設置爲另一個答案。
2
Config.DEBUG不推薦使用BuildConfig.DEBUG來代替。
有關如何在Android應用程序中使日誌記錄更加一致的信息,請參閱適用於Android(iosched)的Google I/O應用程序源代碼以供參考。 http://code.google.com/p/iosched/source/browse/android/src/com/google/android/apps/iosched/util/LogUtils.java
相關問題
- 1. Base64Encoding已棄用:iOS 7.0中已棄用
- 2. [棄權] MultiJson.decode已棄用
- 3. DLR:IAttributesCollection已棄用?
- 4. setCellValue已棄用
- 5. stringWithContentsOfFile已棄用
- 6. 'sharedDispatcher'已棄用
- 7. 'initWithFrame:reuseIdentifier'已棄用
- 8. setFont已棄用?
- 9. UIPopoverController已棄用
- 10. CURLM_CALL_MULTI_PERFORM已棄用
- 11. 已棄用Httpclient
- 12. MKReverseGeocoder已棄用
- 13. AuthorizationExecuteWithPrivileges已棄用
- 14. SVNWCUtil.createDefaultAuthenticationManager已棄用
- 15. File.toURL()已棄用?
- 16. Android:getIntent()已棄用
- 17. 已棄用`route.transitionTo`?
- 18. OnCameraChangeListener()已棄用
- 19. FAXCOMEXLIB已棄用?
- 20. AndroidHttpClient已棄用
- 21. 'dismissModalViewControllerAnimated:'已棄用
- 22. 'gtk_widget_override_font'已棄用
- 23. GameObject.renderer已棄用
- 24. LSOpenApplication已棄用?
- 25. sharedScheduler已棄用?
- 26. 已棄用c#
- 27. ConstantScoreRangeQuery已棄用
- 28. dataTaskWithRequest:completionHandler:已棄用
- 29. cString已棄用?
- 30. SKPayment已棄用
Config.DEBUG何時會爲true,何時會爲false?它是否由Manifest文件確定?謝謝。 – michael 2011-03-28 22:30:00