I know that adb install
will not replace an existing package if it's of a different build type (i.e. debug vs. release).
Eclipse also successfully replaces the debug apks whenever I run a debug session.
But when I attempt adb install
for replacing an existing release apk with another release apk (same package name!), I get a failure message:
adb install myapp-release.apk pkg: /data/local/tmp/myapp-release.apk Failure [INSTALL_FAILED_ALREADY_EXISTS] 745 KB/s (34310 bytes in 0.044s)
Wasn't that supposed to work? What am I missing?
You need to uninstall the one already installed on your device and then try to install the one you wanted. It should solve the problem. You need to uninstall previous version of that application to install new updated version of that application.
I suppose if the app is already installed, you need to supply the -r
key:
adb install -r myapp-release.apk
From the adb
help:
'-r' means reinstall the app, keeping its data
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With