


I let the auto updater run and after it was done, when I run the code I get the following error: C:\Users\me\Projects\proj\proj\proj\app\build\generated\source\buildConfig\stage\debug\proj\BuildConfig.java:22: error: illegal forward reference public static final String. Some SDKs require you to have an API key in your Android manifest file, which will have different values depending on your build type (debug key on debug app and a production key on release app). I updated gradle 4.0.1 to 7.0.3 because I need the support of new gradle.

Hint: Instead of having a different function name for each type ( buildConfigString, buildConfigBoolean), etc.), you can create functions that have the same name buildConfigField but with different value types: fun BaseFlavor.buildConfigField(name: String, value: Int) = buildConfigField("Int", name, value.toString()) fun BaseFlavor.buildConfigField(name: String, value: Float) = buildConfigField("Float", name, value.toString()) // etc Inject build types properties buildConfigField During build process a static BuildConfig class is created. def FIELDNAME 'SERVERURL'dan buildConfigField 'boolean', FIELDNAME, 'false'bekerja dengan baik bersama. You can add extra functions to support all other types. And, not less important, Gradle can handle build types and a team can create an environment to automate tasks like deploy. So, it can do a lot of heavy work like to build classes for constants and resources, compile project, export. Declaring build config fields from ou Gradle files is now way simpler (our functions can be used from a flavor or a build type): buildConfigBoolean(“ENABLE_CRASH_REPORTING”, true) buildConfigString(“TIME”, “42”) Gradle is the standard build tool for Android Studio.
