Why does adb install <same-packagename-always-release> fail?

I know that adb install will not replace an existing package if it has a different build type (e.g. debug vs. release).

Eclipse also successfully replaces debug apks whenever I start a debug session.

But when I try adb install to replace an existing apk release with another apk release (same package name!), I get an error 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) 

Shouldn't that work? What am I missing?

+60
android adb apk
Jan 29 '12 at 14:10
source share
1 answer

I assume that if the application is already installed, you need to provide the -r switch:

 adb install -r myapp-release.apk 

From adb help:

 '-r' means reinstall the app, keeping its data 
+145
Jan 29 2018-12-12T00:
source share



All Articles