Best Way to Include Debug Code?

后端 未结 7 1228
既然无缘
既然无缘 2020-12-24 01:43

I am programming Android applications, and the best way here may or may not be the same as Java in general.

I simply want to be able to set a debug flag that will on

7条回答
  •  情书的邮戳
    2020-12-24 02:10

    I suggest to use inbuilt android API BuildConfig

    if (BuildConfig.DEBUG) {
      // do something for a debug build
    }
    

提交回复
热议问题