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?
For me, selecting Signature Version v1 and v2 both solved the problem
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.
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"
I was facing same problem And I solved it this way, For Current Updated Android Studio 2.3
Build > Generate Signed apk.
Create Keystore path.
Put Password, alias, key password.
Build type select accordingly(eg to release in playstore use release).
Signature Version select both V1 and V2 checkboxes.
Finsih.
Go to the apk from explorer and use it for your playstore or in devices as Signed and Certified apk file.
For me the solution was to disable Play Protect on device.
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"
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.
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. 🙂
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.
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
In my case it was the proguardFiles path in build.gradle that caused this problem
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!
step one - open play store and select play protect
step two - click play protection setting button
step three - disable
step four - close and install your APK manually
Related
In my emulator, when I try to do an upgrade of my apk programmatically. I get:
Android App Not Install.
An existing package by the same name with a conflicting signature is already installed
I'm still in the testing phase of this upgrade, so the file I download is a signed apk of a previous version, which I think should work without any issues.
From the suggestion in: an existing package by the same name with a confilcting signature is already installed I tried to run the emulator both in debug mode and in normal mode... neither worked.
Any thoughts on what I'm missing?
I had the same error message, but these answers did not help. On a 4.3 nexus 7, I was using a user who was NOT the owner. I had uninstalled the older version but I kept getting the same message.
Solution: I had to login as the owner and go to Settings -> Apps, then swipe to the All tab. Scroll down to the very end of the list where the old versions are listed with a mark 'not installed'. Select it and press the 'settings' button in the top right corner and finally 'uninstall for all users'
The problem is the keys that have been used to sign the APKs, by default if you are running directly from your IDE and opening your Emulator, the APK installed in the Emulator is signed with your debug-key(usually installed in ~/.android/debug.keystore), so if the previous APK was signed with a different key other than the one you are currently using you will always get the signatures conflict, in order to fix it, make sure you are using the very same key to sign both APKs, even if the previous APK was signed with a debug-key from another SDK, the keys will definitely be different.
Also if you don't know exactly what key was used before to sign the apk and yet you want to install the new version of your app, you can just uninstall the previous application and reinstall the new one.
Go to Settings > Apps, find and open the app info. Then, open the overflow menu (3 vertical dots), and choose Uninstall for all users.
Go to Settings > Apps, find and open the app info. Then, open the overflow menu (3 vertical dots), and choose Uninstall for all users.
If you are using the debug apk, the key that is used to sign it is in
C:\Users\<user>\.android\debug.keystore
If you use that same key, there should not be a conflict when installing.
If you don't want to bother with the keystore file, then just remove the package altogether for all users.
Connect your device with Mac/PC and run adb uninstall <package>
Worked for me.
Ref: https://android.stackexchange.com/questions/92025/how-to-completely-uninstall-an-app-on-android-lollipop
If above solutions did not work for you then you may have doing something as following ..
1) installing the app from Appstore.
2) updating it with sign APK with same package name updated version.
So basically there are two kinds if APK's.
1) you uploaded on playstore known as original APK.
2) download from playstore known as derived APK.
In this case basically you are downloading derived apk and updating it with original APK.
For let it work fine uploaded new signed released APK in the internal test mode on the Google Play Store and download the derived APK to check the update scenario.
There is a difference between signed and unsigned APK files. Most likely you had an unsigned on there previously. You just need to delete the unsigned before you install the signed version. How this can be accomplished varies on the exact version, but in general, go on the emulator to settings-> application, long click your app, and delete/remove/uninstall it.
If you use multiple users at android, verify that the app is uninstalled everywhere.
It may be application is not uninstall successful. If your device is this case, you can try this method.
First get the package name of the application, e.g 'com.xxx.app', you can use Root Explorer and find it from Manifest file(RE can decode the file). then you can use this script to uninstall it:
adb shell pm uninstall com.xxx.app // replace to package name that you want to remove
I had an issue where both debug and release build won't install on devices I used for debugging. The same msg would appear when trying to install the new version. The only workaround was to uninstall the current version and install the new one.
It looks like Android studio marks the apk it installs so that installation using the package managers would distinguish between version installed for debugging and versions downloaded from Google play or other external sources (this never happened to me when using eclipse).
There may be another reason when your application will not update when you either change/add/remove shareId in AndroidManifiest.
"android:sharedUserId"
Please check that also.
To prevent would recommend to use sharedUserId in your application despite in your current requirement you need or now.
Same package error:
Create a new Package in your app with different name.
Copy and paste all file in your old package to new Package.
Save Code.
Delete old Package And Clean and rebuild project.
I had to login as the owner and go to Settings -> Apps, then swipe to the All tab. Scroll down to the very end of the list where the old versions are listed with a mark 'not installed'. Select it and press the 'settings' button in the top right corner and finally 'uninstall for all users'
I tried all the above and it did not work.
I found that in spite of uninstalling the app a new version of the app still gives the same error.
This is what solved it:
go to Settings -> General -> application Manager -> choose your app -> click on the three dots on the top -> uninstall for all users
Once you do this, now it is actually uninstalled and will now allow your new version to install.
Hope this helps.
I just choose uninstallAll in Gradle Bar. It worked for me.
I have checked this android 5.0 lollipop app install shows Unknown error code during application install: "-505". But it doesn't seem to address my case as I dont use multiuser env.
I have an app in the playstore which worked fine on my nexus 4(4.4.x) till i upgraded to lollipop and it showed this error every time i tried to install it from playstore(It installs fine if I run it via adb).
Can't understand why I might be facing this issue, neither is there any other reference to this error code.
Any help is appreciated.
This seems stupid on my part, yet finally found the answer which seems to be the fact that I had another dev app(diff package name) which had a common signed permission with the playstore app.
Buried deep in my logcat was this.
11-21 16:20:02.855: E/Finsky(8986): [1] PackageInstallerImpl.handleCommitCallback: Error -505
while installing <package>: INSTALL_FAILED_DUPLICATE_PERMISSION: Package <package> attempting to
redeclare permission <package>.permission.MAPS_RECEIVE already owned by
beginning with lollipop it seems this isn't permitted.
Thanks to everyone.
EDIT
The solution if not apparent yet is to change the permission from
<permission android:name="<old package>.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
to
<permission android:name="<new package>.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
or whichever signed permission that is causing the same.
With an official Lollipop version
and for mac users (i'm sure it's analogue to windows users):
Go to the terminal,
cd into: ADT/sdk/platform-tools
type ./adb uninstall the.app.package
and thats it!
you just uninstalled the app
don't add the -k flag - ('-k' means keep the data and cache
directories)
good luck!
This is caused by a bug with app certificate parsing in Lollipop:
https://code.google.com/p/android/issues/detail?id=79089
If the app you are trying to install has the same certificate as a similar app or related app with the SAME certificate, then Android 5.0 won't allow the installation, believing you are installing a duplicate of the already installed (but different) app. Only solution that worked for me? Uninstall the app with the same certificate, which would be an app made by same developer that made the app you are trying to install. Once you've uninstalled that app, install the problematic app, then go back and reinstall the other app which was already installed. This problem happened to me only once, when trying to install the FB Messenger app. I finally was able to install it after I uninstalled the Facebook app. Then I reinstalled Facebook after Messenger was installed. OK, good luck to all and hope this helps some of you.
Multiple users installing same app on same device may cause this error. Please remove other app from the device and that should work.
I faced similar issue, however in my case it was an old development build sitting on my device and when I was trying to install from play store this error was coming.
I have got similar problem and solved with this solution.
Solution: After you update your Android device to Android 5.0 Lollipop from an older version using Over-the-air update or sideloading factory image, do a factory reset. It has been found out that if you do a factory reset immediately after updating your Android version, the error does not occur, but if you don’t the error persists. Don’t forget to clear the cache too, going to Menu > Settings > Apps > Google Play Store > Clear Cache. Clear the data too, from the very same option.
Source: http://appslova.com/android-fix-unknown-error-code-application-install-505-error-505/
Hope this help!!
Try resetting the play store app. You won't lose your apps following these steps. Nothing important will be lost.
Steps to follow on a motorola xoom
Go to the app drawer (menu)
Tap settings
Tap applications
Tap the "All" tab
Scroll through and look for play store
Tap Play Store (not play store services!)
Tap "clear data"
You will then get a warning, click "ok"
That's it, go through your problem again and see if it fixed. Bear in mind you will have to re-accept the terms and conditions for the play store app, when this comes up, simply click "accept"
try adding applicationId to the defaultConfig section of gradle file like
defaultConfig {
applicationId "com.example.www"
}
In my emulator, when I try to do an upgrade of my apk programmatically. I get:
Android App Not Install.
An existing package by the same name with a conflicting signature is already installed
I'm still in the testing phase of this upgrade, so the file I download is a signed apk of a previous version, which I think should work without any issues.
From the suggestion in: an existing package by the same name with a confilcting signature is already installed I tried to run the emulator both in debug mode and in normal mode... neither worked.
Any thoughts on what I'm missing?
I had the same error message, but these answers did not help. On a 4.3 nexus 7, I was using a user who was NOT the owner. I had uninstalled the older version but I kept getting the same message.
Solution: I had to login as the owner and go to Settings -> Apps, then swipe to the All tab. Scroll down to the very end of the list where the old versions are listed with a mark 'not installed'. Select it and press the 'settings' button in the top right corner and finally 'uninstall for all users'
The problem is the keys that have been used to sign the APKs, by default if you are running directly from your IDE and opening your Emulator, the APK installed in the Emulator is signed with your debug-key(usually installed in ~/.android/debug.keystore), so if the previous APK was signed with a different key other than the one you are currently using you will always get the signatures conflict, in order to fix it, make sure you are using the very same key to sign both APKs, even if the previous APK was signed with a debug-key from another SDK, the keys will definitely be different.
Also if you don't know exactly what key was used before to sign the apk and yet you want to install the new version of your app, you can just uninstall the previous application and reinstall the new one.
Go to Settings > Apps, find and open the app info. Then, open the overflow menu (3 vertical dots), and choose Uninstall for all users.
Go to Settings > Apps, find and open the app info. Then, open the overflow menu (3 vertical dots), and choose Uninstall for all users.
If you are using the debug apk, the key that is used to sign it is in
C:\Users\<user>\.android\debug.keystore
If you use that same key, there should not be a conflict when installing.
If you don't want to bother with the keystore file, then just remove the package altogether for all users.
Connect your device with Mac/PC and run adb uninstall <package>
Worked for me.
Ref: https://android.stackexchange.com/questions/92025/how-to-completely-uninstall-an-app-on-android-lollipop
If above solutions did not work for you then you may have doing something as following ..
1) installing the app from Appstore.
2) updating it with sign APK with same package name updated version.
So basically there are two kinds if APK's.
1) you uploaded on playstore known as original APK.
2) download from playstore known as derived APK.
In this case basically you are downloading derived apk and updating it with original APK.
For let it work fine uploaded new signed released APK in the internal test mode on the Google Play Store and download the derived APK to check the update scenario.
There is a difference between signed and unsigned APK files. Most likely you had an unsigned on there previously. You just need to delete the unsigned before you install the signed version. How this can be accomplished varies on the exact version, but in general, go on the emulator to settings-> application, long click your app, and delete/remove/uninstall it.
If you use multiple users at android, verify that the app is uninstalled everywhere.
It may be application is not uninstall successful. If your device is this case, you can try this method.
First get the package name of the application, e.g 'com.xxx.app', you can use Root Explorer and find it from Manifest file(RE can decode the file). then you can use this script to uninstall it:
adb shell pm uninstall com.xxx.app // replace to package name that you want to remove
I had an issue where both debug and release build won't install on devices I used for debugging. The same msg would appear when trying to install the new version. The only workaround was to uninstall the current version and install the new one.
It looks like Android studio marks the apk it installs so that installation using the package managers would distinguish between version installed for debugging and versions downloaded from Google play or other external sources (this never happened to me when using eclipse).
There may be another reason when your application will not update when you either change/add/remove shareId in AndroidManifiest.
"android:sharedUserId"
Please check that also.
To prevent would recommend to use sharedUserId in your application despite in your current requirement you need or now.
Same package error:
Create a new Package in your app with different name.
Copy and paste all file in your old package to new Package.
Save Code.
Delete old Package And Clean and rebuild project.
I had to login as the owner and go to Settings -> Apps, then swipe to the All tab. Scroll down to the very end of the list where the old versions are listed with a mark 'not installed'. Select it and press the 'settings' button in the top right corner and finally 'uninstall for all users'
I tried all the above and it did not work.
I found that in spite of uninstalling the app a new version of the app still gives the same error.
This is what solved it:
go to Settings -> General -> application Manager -> choose your app -> click on the three dots on the top -> uninstall for all users
Once you do this, now it is actually uninstalled and will now allow your new version to install.
Hope this helps.
I just choose uninstallAll in Gradle Bar. It worked for me.
I'm trying to publish a new version of my Android app to Google Play and get the following error?
This configuration cannot be published for the following reason(s):
Version 1 is not served to any device configuration: all devices that might receive version 1 would receive version 4
I don't understand it. What does it mean?
This happened to me when I published two APKs (versions 3 and then 4) in a short space of time. Clicking "Deactivate" on the dropdown next to version 3 appeared to fix it.
My guess is that this is a very-poorly-worded error message meaning something like "your original APK hasn't been published to all the update servers yet, so some of them may miss that version entirely". But it's a bit of a guess.
For some reason when you upload a new APK without immediately clicking "publish" (you probably clicked save draft the first time), Google thinks you want to publish BOTH apk at the same time.
This is usually needed when you have multiple APK for different configuration (say: a version for android 2.x and another for 3+ or a version for tablet and another for handset etc...)
However in your case you are just uploading an upgrade and you want it to replace your previous APK.
To solve:
Click on the Switch to Advanced Mode on the top right
Click on Action -> Move on the OLD APK and choose "Deactivate"
The error should go away and you should see your OLD apk in "OTHER APKS" and the new one ready to be published.
Just click Publish to make your change effective and wait for them to propagate.
The Google warning is missleading.
Hope this clarify it.
I have solved the same problem with my app. I must upload from version 1.0 to the version 2.0.
- I have uploaded the v2.0 in Beta.
- When it was uploaded, I have DEACTIVATED the v1.0 in the PROD.
- Next step was to MOVE the v2.0 to PROD from the BETA.
- Then, the PUBLISH button was activated to finish the process.
I hope it helps.!
The solution of #Chris is right. But what the message really means is:
version1 and version4 has the same configuration: same API level, same screen resolution... bascially everything in manifest...
So this means any device can install version can install version4, too.
Now everything is clear: since version4 has higher versionCode, every devices will recieve the version4 instead version1.
There's no meaning still put version1 "in production" anymore. Under no circumstance any device would recieve this version. So you should "deactivate" it.
This may be a hack, but you can workaround this by doing staged rollout to 1-50%, then increase it to 100%.
This case the error message does not prevent publishing your app and also you don't have to deactivate anything.
This is purely a guess but do you have a previous version uploaded? If so it might be that it's marketcode is set to something higher than your new build e.g. 4
I had a similar problem, but because my previous version had a lower maximum andorid api, I was not allowed to revert to previous version.
In the end for me it was a problem wit eclipse that was not saving the change to the manifext file. I restarted eclipse, saved my project, made an apk and then it worked. Maybe worth a try if the above answers fail.
I just switched to the basic view. Which automatically replaces the current version with the new version immediately. That is of corse not suitable for every app deployment scenario. But should be all right in most (simple) cases.
You can only have one APK in production at a time. Before uploading you must deactivate the current one. The same goes for alpha and beta test APKs combined - you can only have one APK published for testing.
I agree the wording of the error message is appalling!
I had the same issue, but I executed following command on my APK file
jarsigner -verify -verbose -certs Myapp.apk
then I uploaded the new APK on the play store and it published easily.
I guess the console is telling your that u have two versions supporting the same devices so there is no reason to be using both
solution: remove the older one...
OR
if ur older version supports specific devices, mark that and the console will accept it
I also received that problem when I uploaded the APK at the first time but I noticed that API level 18-17 when viewing APK details. Therefore, I added this code to AndroidManifest.xml to specify the maximum API level
<uses-sdk android:minSdkVersion="18"
android:targetSdkVersion="23"
android:maxSdkVersion="23" />
After doing this, the problem is solved :)
in my case
an older version of apk was published in beta testing. while i was trying to update my app over already published app with new apk.
just moved my new apk to beta testing and unpublished the old apk from beta testing.
and then finally moved the new apk from beta to prod.
I had the same problem i just DEACTIVATE the old apk which was currently active and then upload new apk. IT SOLVED my Problem
To resolve the issue, do the following:
delete the new apk that is in the draft mode
clear the history cach of the browser or use other browser and re-upload the apk
I had the same issue, but I resolved by Block Lint Errors.
See the Lint Error page, right corner packager icon, click there and block package.
When you click for leaving lint error, the application make export singed application package.
it happened to me, when I published new APK, but accidentally closed browser window without finishing submission.
I've been building an application, and it works fine on all the ICS phones I've tried to install it on. However, when I try to install the apk on my friend's new Jelly Bean phone, it just says "Application not installed". I've set his device to not verify installs and I've made sure his install applications not from google play option is checked.
In the actual code, I have the minimum api set to 14, and the target set to 17. Still I can't get it to install.
Does anyone have any idea what could be causing this?
The apk needs to be signed. You can do this from Eclipse: right click on your project -> Android -> Export Signed Application package. More info here: http://developer.android.com/tools/publishing/app-signing.html.
For others still wondering why this is happening.
Please note that if you are using android studio 2.3 or above and have
used signature versions v2(full apk signature) then your app may cause
installations problems on previous versions.
Solution use traditional jar signature scheme v1 while Generating APK.
for more info hit this link