Issue with BuildConfig.FLAVOR after Android Studio 3.6 update

Viewed 3188

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 Answers

Try to reganerate all auto generate files of gradle again.

Build -> Run Generate Sources Gradle Tasks

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.

Related