I have created custom buildTypes as follows and am not using the default debug and release buildTypes
buildTypes {
releasefree {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
releasepro {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationIdSuffix ".pro"
}
debugfree {
shrinkResources true
applicationIdSuffix ".debug"
debuggable true
}
debugpro {
shrinkResources true
applicationIdSuffix ".pro.debug"
debuggable true
}
}
Reason for doing this: I have several productFlavors and need to have a PRO version for each and I felt this was easier than creating a seperate PRO flavor for each free one. My code handles the difference using APPLICATION_ID from BuildConfig class. Another reason is i have customized classes and will need to replicate twice if i have two separate flavors. I know i can configure sourcesets, but I've had problems with that when i have too many flavors. Very difficult to track.
Now the issue: When i try to run the application using a custom buildType build variant, it asks me to create a signing configuration for each custom build type.
Similarly i see a message in the Run console when executing:
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
Installation failed since the APK was either not signed, or signed incorrectly. If this is a Gradle-based project, then make sure the signing configuration is specified in the Gradle build script.
I understand that it may be required. But, what I was trying to find out was: Is there a setting what i could change so that the debugfree and debugpro buildTypes I've created could bypass the signing configuration requirement just like the default debug buildType? I know creating a signing configuration is a one minute thing and I'll do it if i do not get something soon. But just out of curiosity I want to understand what needs to be done to make the custom buildType work like the default debug buildType and not require a signing configuration.
Tried setting
debuggable true
(which was the only difference in the properties of th default debug buildType and my custom debug buildType) hoping it would work like the default debug buildType, but did not. What else need to be changed for the custom buildType to work like the default one i.e. not require a signing configuration.