Closed ayamada closed 11 years ago
Hello Atsuo!
Yes, first I went with uninstalling, but then I commented it for the following reason - after uninstallation all application data is lost. It is quite annoying when you develop and keep some data in the application (DB, SharedPreferences etc, custom files etc.).
I think, this should be handled in a more intelligent way. Thank you for the heads-up nonetheless, I will push a solution soon.
Hello Alexander!
Oh... I understand. It's just as you say. I'm sorry for took up your time, and thank you!
Atsuo,
Your input is very helpful and well appreciated. This is a bug and I thank you for discovering it. I've made a fix that should resolve the issue. I now try to install the application first, and if it fails because of the certificate mismatch, user is prompted if he wants to replace the application.
Could you please try it out? Thank you!
Hi, Alexander!
I try this fix, but I got Abort execution.
.
I use lein-droid on Windows, that is differ linefeed code, and adb
output log like below.
d:\path\to\android-sdk\platform-tools\adb.exe -s 275501710050095 install -r d:\path\to\project\target/myapp-debug.apk
pkg: /data/local/tmp/myapp-debug.apk
Success
1287 KB/s (4012341 bytes in 3.043s)
I try to fix this, and it work on Windows. I send it later.
Your approach for this issue is very excellent! It is very convenience. Thank you!
Hi.
This code was comment-outed, but it is necesally because
adb install
fails when old APK's private key discord from new APK's private key. It is occur when old APK is debug version and new APK is release version, and vice versa. because debug version was signed by key for debug, but release version was signed by key for release.Below is this error log.
If not installed old APK, then fail to
adb uninstall
, but it is not do anything but displayFailure
. It seems harmless.