Cannot run different configuration of APK

(I can’t seem to embed an image right here, yes, I know I can put a URL but that’s a pain, etc)

“Failed to deploy the package com.blah.blah.APK due to an error; The -k option uninstalls the APK while retaining the data/cache. At the moment, there is no way to remove the remaining data. You will have to reinstall the application with the same signature, and fully uninstall it. If you wish to truly continue, execute 'adb shell command package uninstall -k…”

The rest is cut off. I’m fully uninstalling via the command-line, but it does this every time it tries to depoy a different configuration.

Let me know what I am doing wrong here!

Matt

I’m seeing this as a response, are you guys doing this internally or do we need to handle it?
https://source.android.com/security/apksigning/v2

Hello mshores,
Thank you for letting us know, we’ll look into that.

Hey Mikhail,
(please don’t shoot the messenger! :P )

I believe this is related to signing (e.g. this is a, um, old, yet new, way of telling us to sign our apps.

ON that topic, I assume I should just grab the signing default gradle code you have as we used your signing dialog (which was awesome, btw)? I did the dialog, but since we are using a custom gradle script I assume that is all ignored… am I correct?

Just let me know! :)

Matt

YES, it is a signing issue; you guys will want to give the user a “gentle” reminder to get off their a$$ and sign their non-debug apps ;P

For anyone asking what the custom gradle should be, it could look like this:

android {

signingConfigs {

release {
// TODO:
// 1. Can this ANT build file be read into a Properties object?
// 2. Can the signingConfigs closure be avoided alltogether?
ant.importBuild “<your hard-coded path here OR use a gradle variable to → secure_properties.xml or whatever you named it if you used their Signing Options dialog…>”
storeFile file(ant.properties[“key.store”])
storePassword ant.properties[“key.store.password”]
keyAlias ant.properties[“key.alias”]
keyPassword ant.properties[“key.alias.password”]
}
}

buildTypes {
...
release {
	signingConfig signingConfigs.release
}
}

Thanks, Mikhail!!

Matt