Debug version of Config.java:
package com.test;
public class Config {
public static final boolean D = true;
public static final boolean V = true;
}
Release version of Config.java:
package com.test;
public class Config {
public static final boolean D = false;
public static final boolean V = false;
}
The build script can select one of them to build debug or release version.
In a class that wants to use the switch:
import static com.test.Config.D;
...
if (D) Log.d(TAG, ...);
Reference
http://www.androidsnippets.com/easy-logging-switch-between-debugrelease-versions
'Mobile > android' 카테고리의 다른 글
| [android] JSON parsing (0) | 2012.02.21 |
|---|---|
| [Android] JNI 에서 조심해야 할 사항! (unsatisfiedlinkerror) (1) | 2012.01.18 |
| [Android] AssetManager (0) | 2012.01.16 |
| [android openAL] OpenAL 정리 (0) | 2012.01.15 |
| Android Camera Resolution (0) | 2011.12.30 |