在一些代码示例中,BuildConfig.DEBUG等于true,但在我的项目中,一个等于false。为什么会这样?不幸的是,我在Google Firebase官方网站文档中没有找到任何相关内容。
BuildConfig.DEBUG(除了BuildConfig类中的所有内容之外)是在构建项目时由Android构建工具设置的。它是调试版本时分配为true,发布版本为false。此值与Firebase或其SDK无关。
BuildConfig.DEBUG
另见this question。