Issue with BuildConfig.FLAVOR after Android Studio 3.6 update

4k Views Asked by At

Anyone experiencing issues with BuildConfig.FLAVOR parameter? After Android Studio 3.6 update all of my BuildConfig usages in code were red (as if the import was removed) and I can't override it from app config, only from Crashlytics and other sources. It has critical functionality in my app to load the right URL for API calls based on different flavors.

2

There are 2 best solutions below

0
Martin On BEST ANSWER

I used Build -> Clean Project and then File -> Invalidate Caches / Restart. It was still red after rebuilding, but as I build my App on smartphone it suddenly worked and red color disappeared.

0
9spl On

Try to reganerate all auto generate files of gradle again.

Build -> Run Generate Sources Gradle Tasks