Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

INSTALL_FAILED_ALREADY_EXISTS when trying to install APK-package [duplicate]

Tags:

android

I'm having 2 versions of my Android application. One developer version and one production version. I want to install both versions on my phone.

I get this message:

./adb install application.apk 
1829 KB/s (177760 bytes in 0.094s)
    pkg: /data/local/tmp/application.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]

Is there any way to get around this failure without uninstall my develop version?

like image 871
brasimon Avatar asked Apr 28 '11 12:04

brasimon


2 Answers

adb install -r InfoTest.apk means you uninstall before install -r remove purpose .//adb uninstall InfoTest.apk

Or

Export your app with different .apk location but same signature for both.

means Version code 1.0 for dev Version code 2.0 for production using same keystroke file and certificate.

if you change certificates then install two apps with the same name on emulator/device.

like image 197
Muhammad Mubashir Avatar answered Jan 04 '23 10:01

Muhammad Mubashir


You should change the package in order to let android to differ your versions as package name is a unique identifier of an application.

like image 37
Vladimir Ivanov Avatar answered Jan 04 '23 11:01

Vladimir Ivanov