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 an APK release, I use the following command:
./gradlew assembleEnemRelease
When downloading the generated APK ( app-enem-release.apk ) to Google Play, I received the following error:
You have downloaded the debugged APK. For security reasons, you need to disable debugging before publishing to Google Play. Learn more about debugged APKs.
I managed to create an indestructible APK using hard coding in android Manifest android:debuggable="false" . But the assembly configuration still acts as a debugged assembly, as you can see in the Build.config generation (I double check and this configuration assembly is from the release folder, also I don't get any Crashlytics data and I disabled it from Debug) .
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"; }
source share