I have been reading something about variants and buildtypes and I don\'t know if I am understanding it right but I would like to store a URL for locahost (testing) and one for p
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField "String", "BASE_URL", '"url1"'
debuggable false
}
debug {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField "String", "BASE_URL", '"url2"'
debuggable true
}
This you need to do in the gradle and to make run two applications(release and debug) in a same phone just add
applicationIdSuffix ".debug"
in debug portion. As the package name will be different. This worked for me.