BuildConfig is a class containing static constants that is included in every Android application. BuildConfig includes some default fields such as DEBUG and FLAVOR but you can also add custom values via build. … For example what if our build.
What is BuildConfig class in Android?
This is a configuration file, similar to the R. class file, this class is automatically generated based on the build. It cannot be modified after generation, only the configuration file can be modified. …
What is BuildConfig flavor?
BuildConfig.FLAVOR gives you combined product flavor. So if you have only one flavor dimension: productFlavors { normal { } admin { } } Then you can just check it: if (BuildConfig. FLAVOR.