21

I updated my app and tested it on my device. Everything works fine if I test the app via the run button in eclipse but if I export it into an apk and try to install the apk it fails.

There is no error code or anything else, it just says the app has not been installed.

Any idea why this happens? I only changed a few things in my app: I removed the basegameutils lib from my app and migrated to the new api without basegameutils. Thats it (except for some bugfixes but that can not be the cause).

I did already restart eclipse and cleaned all projects mutiple times.

The target sdk is 22 and I am using newest system images and so on for that api level (my divce is a stock nexus 6 with 5.1.1 running). I also updated my build tools to 23.0.1 from 22.0.1 and removed the 22 version. Is this the cause?

I also tried to upload the apk in the dev console and there were no erros.

Thank you for your help.

EDIT:

The logcat output says the signature does not match the previously installed version.

If i try to install the current live version via the play store there is also an error message saying i can not install this app because another user already installed an incompatible version on this device (but i dont have it installed and i dont have multiple users on the device).

If i got to the app menu in the settings my app is shown at the bottom of the list but there is a note saying the app is not installed for the users. If i click on it all buttons are unclickable (so i can not uninstall it).

What is happening?

user3254126
  • 491
  • 1
  • 4
  • 15

12 Answers12

70

For me, selecting Signature Version v1 and v2 both solved the problementer image description here

Suben Saha
  • 1,778
  • 16
  • 21
  • for me this was the solution ... but I also had to manually uninstall the program version I used with the debugger – PrfctByDsgn Dec 21 '18 at 11:36
14

Your signature changed, so as you mentioned you must uninstall the previous version. You tried to uninstall from the device UI and that fails - so try it from the command-line:

adb uninstall your_package_name

Seen on Nexus devices, occasionally only command-line uninstalls work.

Hermit
  • 1,214
  • 13
  • 24
10

I found a solution but I still have no idea what caused the problem.

somewhere on my device my app was still installed even though it didnt show up in the app drawer and the play store told me the same. In the settings/apps menu my app was still present (as i mentioned in the edit of my original post) so i clicked on it. If you click on the menu button you can chose unisntall for all users which did the trick. now I can install my apk again.

I have no idea how this happened but there you go, i hope this helps.

EDIT:

I had the same problem as this guy had. the accepted answer over there is much nicer than my poorly foramtted text ;)

"You cannot install this app because another user has already installed an incompatible version on this device"

Community
  • 1
  • 1
user3254126
  • 491
  • 1
  • 4
  • 15
  • Such situation can occur if you have multiple accounts on a single device. If you uninstall app then it is not available on one (or every) account but is still stocked in memory. If you try to install app signed with different key than it will throw an error. – kreatywny Nov 08 '16 at 16:28
  • Android Studio installs the app for all users when debugging. I would have expected a better error message when the install failed. – glez Feb 02 '17 at 15:13
9

I was facing same problem And I solved it this way, For Current Updated Android Studio 2.3

  1. Build > Generate Signed apk.
  2. Create Keystore path.
  3. Put Password, alias, key password.
  4. Build type select accordingly(eg to release in playstore use release).
  5. Signature Version select both V1 and V2 checkboxes.
  6. Finsih.
  7. Go to the apk from explorer and use it for your playstore or in devices as Signed and Certified apk file.
Crime_Master_GoGo
  • 1,641
  • 1
  • 20
  • 30
  • This is the case when the APK is not signed so the device with inherent feature rejects such APK's. But here the question was regarding the APK's which were signed but still failing to install only because the people had tried installing it sometime before and it left the residue due to incomplete uninstallation. – Mantra Apr 21 '18 at 17:48
5

For me the solution was to disable Play Protect on device.

Péter Aradi
  • 370
  • 1
  • 4
  • 12
1

You can not run signed apk directly in your android device .

I you want to run your apk then follow below steps :

1) Go to your device settings

2) In setting you find applications

3) In application checked unknown sources

This will allow you to run your signed apk without downloading from play store.

or try this link :

"You cannot install this app because another user has already installed an incompatible version on this device"

Community
  • 1
  • 1
KishuDroid
  • 5,411
  • 4
  • 30
  • 47
1

The problem is because you have a version of your testing app. So, you're not really upgrading the app! Those are two different apps. You must first uninstall previous version (testing) so you can install the release (signed) version of your app.

1

I encountered this problem today and tried a few suggestions here, and this is how I solved the issue: I cleared my phone's caches / junk files and also uninstalled the test versions of the app and their APKs, and then reinstalled the new APK. Try this first before getting worried.

0

I got the save Error just incase someone faces this. For me it was because i have multiple projects for the same app on the phone. you need to delete older versions of the app from your phone.

Salah Klein
  • 380
  • 3
  • 12
0

If you have two options (V1 (jar signature) and V2 (Full APK Signature)) before generation signed apk. you should use V1 jar signature now, because there is no backward compatibility and all android phones with version < 7 won't accept this signature. Backward compatibility will be added in some next N Developer Preview. There are also explanations on this developer.android in this link : https://developer.android.com/about/versions/nougat/android-7.0#apk_signature_v2

Babak Karchini
  • 155
  • 1
  • 8
0

In my case it was the proguardFiles path in build.gradle that caused this problem

Reza
  • 906
  • 2
  • 15
  • 29
0

Currently PlayStore performs regular checks for apps and device for harmful behavior. Installing signed APK manually is treated like unusually behavior so is preventend. So turn off play protect feature temporary and your install will work as charm!

  1. step one - open play store and select play protect
  2. step two - click play protection setting button
  3. step three - disable
  4. step four - close and install your APK manually
Daniel
  • 2,320
  • 1
  • 14
  • 27
elieli
  • 1
  • 2