BuildConfig.DEBUG always return false
Check imports in the class, make sure you are using correct BuildConfig path. You may use BuildConfig not from your app, but from some library.
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.