I have three build types, and I am trying to get the staging build type to run but I am getting the following error:
Error: The apk for your currently selected variant (app-staging-unsigned.apk) is not signed. Please specify a signing configuration for the variant (staging).
Is there a way for me to run staging without signing, as like a second debug?
android {
buildTypes {
debug {
buildConfigField "String", "SERVER", '"dev.gamesmart.com"'
}
staging {
buildConfigField "String", "SERVER", '"staging.gamesmart.com"'
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "String", "SERVER", '"gamesmart.com"'
}
}
}
Try:
android {
buildTypes {
debug {
buildConfigField "String", "SERVER", '"dev.gamesmart.com"'
}
staging.initWith(buildTypes.debug)
staging {
buildConfigField "String", "SERVER", '"staging.gamesmart.com"'
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "String", "SERVER", '"gamesmart.com"'
}
}
}
This says "have staging start as a clone of debug, then we'll modify from there", so staging should apply the debug signing config.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With