I am trying to convert our Android application to a gradle build. I have the project and it\'s libraries building successfully. I am now trying to create separate apks fo
Please, be sure that you are building "dev" or "prod" variant. There is no BuildConfig definition in default "debug" and "release" variant. In Android Studio, you can select current variant in bottom left corner:
To simplify your build.gradle file, you can define:
buildTypes {
debug {
buildConfigField "String", "URL_SEARCH", "\"https://dev-search.example.com\""
// etc.
}
release {
buildConfigField "String", "URL_SEARCH", "\"https://search.example.com\""
// etc.
}
}
and then just use default "debug" and "release" variants.
At last, delete semicolon (sign: ';') from the value of buildConfigField parameter.