I'm trying to run Robolectric with constant BuildConfig.class but it looks like it is not available for all flavors that are generated by gradle. is there a command to have gradle make this file for all of them?
Asked
Active
Viewed 2,705 times
1 Answers
1
The BuildConfig is automatically generated based on which Build flavor you select. In Android Studio, click on Build Variants on the left of the IDE window. Select your build flavor, clean up the project and the BuildConfig will be generated according to the selected flavor.
Can you show your gradle file?

Kanishk
- 506
- 3
- 14
-
I got it working by adding in gradle file for all flavors and resynched the project and that worked. buildConfigField "boolean", "REPORT_CRASHES", "false" – Andrei Chernyshev Jul 23 '15 at 13:46