I have the following code on my build.gradle:
productFlavors {
juridico {
applicationId "br.com.eit.appprovaconcursos"
}
enem {
applicationId "com.ioasys.appprova"
}
}
buildTypes {
defaultConfig {
debuggable false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
testCoverageEnabled true
}
release {
debuggable false
testCoverageEnabled true
//noinspection GroovyAssignabilityCheck
signingConfig signingConfigs.release
}
}
To generate de release APK I use the following command:
./gradlew assembleEnemRelease
When uploading the generated APK (app-enem-release.apk
) on the Google Play I got the following error:
You uploaded a debuggable APK. For security reasons you need to disable debugging before it can be published in Google Play. Learn more about debuggable APKs.
I was able to generated a non-debuggable APK by hard coding on android Manifest android:debuggable="false"
. But the build config still acting like a debuggable build, as you can see in the generate Build.config (I double check and this build config is from the release folder, also I am not receiving any data on Crashlytics, and I disable it from Debug builds).
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID = "com.ioasys.appprova";
public static final String BUILD_TYPE = "release";
public static final String FLAVOR = "enem";
public static final int VERSION_CODE = 20135;
public static final String VERSION_NAME = "3.0.1";
}