Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

android

apk

adb

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?

like image 895
an00b Avatar asked Jan 29 '12 14:01

an00b


People also ask

How do I fix app not installed package conflicts with an existing package?

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.


1 Answers

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 
like image 198
alex.zherdev Avatar answered Oct 24 '22 07:10

alex.zherdev