Why does BuildConfig.DEBUG
return false, when I run the application?
I use it to control the log like the following:
public static void d(String LOG_TAG, String msg){
if(BuildConfig.DEBUG){
Log.d(LOG_TAG,msg);
}
}
In your Android Studio build variant are you on debug variant?
That is applied when you use flavors
, either for debug
or release
.
in the debug mode, BuildConfig.BUILD
is true, and in the release mode, it is false.