I have developed different versions of an android applications and exported them to my phone.I have renamed the different apk files like Myapp1.0.apk,MyApp1.1.apk etc.I have also given different names to all the apps.But whenever I am installing a specific version of the app,the previous version is getting automatically uninstalled.
I am confused what is uninstalling the earlier app version automatically??
Can anybody throw some light on this??
Android works by package name. If you install another app with the same package name, it replaces the previous app with that package name. Its how Android does updates. The name of the apk means nothing.
Also, if you try to install another apk with the same package name signed by a different key, it will fail due to security checks- so if you work with multiple people on the same app, you should share debug keys to prevent having to manually uninstall all the time.
Your package is probably the same in every version. This is what identifies your application in the android system. So the versions you install are just new version of the same app... and if you install a new version android automatically removes the old version.
Hope it helps.
the identity of an android application is it's application package. If you use a same package name then it will replace the existing apps. That's how the update of app works.
If you want to run two instance of same app in a device for some purposes, then just rename the application package and install.
I guess you are using the Same package Name for all the versions and in android you can't install two applications with same package try to change the package name and try to install it again hope this will work....
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.
Information:
Currently, I have an application on the market that is actively used. Rather than refactor all my code to rebuild the application, I rebuilt the whole application from scratch in a new Android Studio Project with identical/updated information (applicationId/packageId/versions). I want to upload this apk to the google play store to have it update users normally.
Problem:
Testing this situation on my devices hasn't worked. I have a device with the 'old' application on it and I attempt to install the 'new' version and I receive this error during installation: "The package seems to be corrupt"
Question:
Is this process even possible? If so, why might I be getting this error? If not, what is the method by which I could do this?
Thanks!
It is possible as you say, however you need to keep three things in mind:
Package name must be the same
Signing key must be the same
Version number must be higher than last version
Other than that, there should be no problems
You are not going to be able to push the update to the play store with your new project, because the file that you sign the application with (signing key), is associated with your project old SHA 1 and without that file, you cannot push an update.
I suggest you create a new copy of your old project and work there
I want to provide an updated version to my app,
It is downloaded from my site not from google play service.
When I download the updated version its not replacing the old version, instead it shows error"An existing package by the same name with conflicting signature".
Is there any solution to replace the app without manually un-installing the older version from the device.
Every android application file – apk has two main things:
package name – (unique id of app like com.example.application)
signature
More information about the second. Every apk file should be signed with developer keystore. If this is the debug version it could be debug-keystore.
In this keystore there are some information about developer and other information.
When you install application android system at first checks package name – whether or not this application have been installed already. And if so system checks signatures. The signature of installed app and app to be installed must be the same. Otherwise you will get error, you describe in your question.
So, the answer is: not, you can't install another application with the same package name if the signatures of installed and to be installed apps are different.
You must uninstall previous version and install new version, if you need new version.
If That is Developed By You or a Developer.
Once Check weather the Entire Code and Package Names are Same or not, in the Manifest file..
If Its Not that app is not from you or your known developer means.
You need to Uninstall Previous Version and Install New One,
That Error You are Getting Is that App is Not Signed, means When we are Using UnSigned App It cannot Replace at the part of Signed app. first of all make your app as Signed.
Check more at Here
How to Make a App as self-Signed at here
Yes, the error message already describes your issue. Your issue is that your app is not signed with the same signature as the previous version.
So to prevent this error message you must sign the app with the same signature as the previous version.
More details about application signing can be found in the Android Developers documents.
to protect the identity of the application each revision(update) requires the same signed key(SHA1) which was used for the earlier release.
Eclipse by default uses debug-key to sign in all the packages.
Use the same method by which you first installed your app and everything should just work.
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 an application already installed on the mobile, am trying to install the update version of it.
I placed the apk inside the data/data folder, using file manager at the path,am trying to install it -
it shows a dialog to replace but not upgarde (Signed with the same key-store and version code/version name has an incremental value).
Could someone explain me more on this?
There is a difference between installing and subsequently, updating, apps off Google Play. Applications installed via a File Manager, for instance, will always prompt you to replace and not update an application. Side-loading apps on devices directly, does not have that mechanism to update. This is true not only for your app, but for every app.
It does not matter how it was signed or even the increment of your app's version.
Upgrade is only possible when you actually follow the installation procedure from Android Market. Else, it would just be a replace.