Installing Debug version of app while Production version is installed - android

I have created an app through Eclipse and have uploaded it in the app store. I have the app installed in my phone.
Now I am working on an update. I am having trouble installing the app because it tells me the signature is different.
I know that this is due to using different keystores to sign each. But I dont want to uninstall the app 'cause I want to make sure that the app is able to go to the normal app update process.
Is there a way to go around this?

There are a few possible solutions to this for you:
Change the package name to some thing different like com.example.myapp.debug and remove that from the package name before publishing (this would have to be in the manifest)
Yes you could uninstall the app, do debug work, then uninstall the debug and reinstall from app store, push the update and wait for Google Play to register that version.
Do as Kai said, sign the new version and install it as an update, but then you won't get the updates as triggered by Google Play unless you uninstall and reinstall

Sign your new version, then you can install it as an update as opposed to uninstalling the Google Play version. This is probably the only way.

Related

Installation failed with message INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package signatures do not match the previously installed version

I want to run my application in phone but I get following message:
Installation failed with message:
INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package signatures do not match
the previously installed version; ignoring!.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
In my phone I have installed previous version of app from google play. I know that uninstalling old version of app from my phone can fix the problem but I don't want to do this because then I might lose all app specific data.
What I tried:
generating signed version of app using the same keystore.jks like previously
changing versionCode and versionName in build.grandle file and then generating new version of app
And still I have the same problem. What should I do to update my app without losing data?
There are two possibilities I can think of
You use Google Play App Signing. If you use Google Play App Signing then the signature in apps coming from Google Play will always be different to the app coming from your IDE. The only way you can get the update to work is to update the app from Google Play. The best way to do this during development is to use an "Internal test track". Google launched these at Google I/O this year and they let you update your app in seconds from Google Play. So when you have an update, don't install from your IDE, upload to Google Play internal test track, republish, and then update from Google Play. It is really quick.
You don't use Google Play App Signing, but you are trying to install your debug build instead of your release/production build. Make sure you are building the production release APK, so it is signed with the same key as the one uploaded to Google Play.
If I'm understanding correctly you want to re install the "same" apk in your phone but with some changes in the code (updates) but Android Studio can't install the new apk.
I can only think in one thing, this is the explanation:
Please remember that android has different "Build Variants" there could be many but you will always have "debug" and "production" build variants, as I can read, you have installed the one in Play Store this means that you have a "production" build variant already installed in your phone, so you need a new "production" variant version of your app with the same build data (code and name version) and the updates in the code.
Build a signed apk with the same data as the previous version (code and name version) (Just like the one you used to upload to Play Store).
Find the signed apk.
Use adb to check your connected devices, expect a list
adb devices
Use adb to install this new apk.
adb -s <device_identifier> install <apk_name_include_apk>
Following those steps should let you install what you need.
Go in your React Native > Android >app
in the app folder,
you can see a build just delete this folder and Clear React Native project by npm cache clean cmd/Terminal Command.
Now try to run I hope it will Run for some of you.
It's working for me.

"App not installed" message when installed apk

So I have an app on the Play Store that I released about a week ago. I've done a ton of work to to it since and I'm basically going to rebrand it a bit.
When I first released the app, I put it up on the app store with the name "First Name of App" (obviously not the correct name). I now have an update ready to publish with a lot of changes, and one change is that the app name is now "Second Name of App". It's all under the same package yet, I just changed the name using the Manifest.
I'm having an issue though with testing. Currently on my own phone, I have the version of the app that is currently on the Play Store installed.
I generated a signed APK using Android Studio (all with the same settings and key passwords and such). I then put that signed apk on my phone for testing, and when I try to install it I get the "App not installed" message.
Things I have tried:
Uninstalling the previous APK and then installing the newer version. If I uninstall the Play Store version first, and then install the newer signed APK version, it installs fine. The problem with this though is that I lose the data that I had in the Play Store version. I can't have that.
Changing the "versionCode" and "versionName" numbers in the build.gradle. I made sure both numbers are higher than what the Play Store version is, but I still get the same "App not installed" message.
Making sure the settings while generating the signed APK are the same. All of the settings are exactly the same. The signature version checkboxes are both checked yet also, as they were with all previous versions.
Anyone have any ideas what could be going on? I really would like to release this update but I'm afraid if I just upload this signed apk to the store that everyone would have the same issue, and that they'd be forced to uninstall the current version they have (resulting in data loss).
The problem seems that you are trying to install an APK with the same package name but different key and that creates a conflict. Android only considers an App to be the same if both package name and key signature are identical.
Keys are unique, even if you use the same settings and passwords each time you create a key a new unique key is created and it will be always different to the key you used in the Play Store release.
The only way to install the APK is to uninstall the Play Store version.
And that serves to emphasize how important it is to keep the key used in the Play Store, if you lose it you will not be able to upload new updates.
UPDATE
If your have "Google Play App Signing " activated for you app, the key used when an user installs the app from Play Store is different than the one you used to upload the release to the Play Console.
https://support.google.com/googleplay/android-developer/answer/7384423?hl=en
Have you by chance changed the minimum SDK version or anything like that? I've had a similar issue. I've an app on the PlayStore which I tried upgrading with an APK with the same signature as that of the PlayStore version but a different minimum SDK version. When I tried installing I get the 'app not installed' error. I then uploaded this APK on the PlayStore. On my device, the app on the PlayStore now shows two options 'Uninstall' and 'Open'. Due to your conflict, users will have to first uninstall the app and install it again. There will be no 'Update' option due to the conflict. Hope this helps :)
Similar Issue
Android Phone: Google Pixel3, Android 9
install youtube apk, but error:
Application Not Installed = App Not Installed
Final Solution
use adb's pm to install apk
even same error, but can show/known the fail reason
then can find specific solution to fix it
Examples
here later encounter many error cases:
blueline:/storage/emulated/0/Download # pm install /data/local/tmp/com.google.android.youtube_16.29.36.apk
pm install /data/local/tmp/com.google.android.youtube_16.29.36.apk
Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
or:
blueline:/data/local/tmp # pm install youtube_16.29.36_addedDebuggable.apk
pm install youtube_16.29.36_addedDebuggable.apk
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /data/app/vmdl445467286.tmp/base.apk: Attempt to get length of null array]
then google it and find specific solution to fix it, install apk successfully.

Android Studio uninstalling previous app on testing upgrade to my app

I have already installed my signed apk app on my device. Now I am giving an update to my app. when I install update from android studio, It asks to uninstall previous app (Obviously because sign identity). I want to import some data from previous app package. So is there anyway to run my current app and debug it over the previous app as an update.
I have searched for this and could not get any similar question. Thanks in Advance.
AFAIK this is not possible, You have to sign the new version using the same debug key

Re-installation failed (YES) Package already exists

So, I have an app which I am running on real device. When running the app the following dialog is shown.
Clicking Yes is followed by error in Console
- google-play-services_lib] Installation error! The package already exists.
- Launch failed on device:
I have tried uninstalling app from my phone but didn't work.
Any idea how to fix it?
You dont need to reinstall google-play-services. It's updating automatically by Play Market.
I had problems like yours and let me guess:
when you debuging app from eclipse - google play services doesnt sign in, but when u release it and download from play market - it works fine.
If its true, so mark your google-services as a library and delete from "java build path" in your app.
right click on project-> Properties -> Java Build Path -> Projects
Delete google-play-services from there
Now, you have to obtain debug certificate SHA1
in Eclipse go to Window->Preferences
Andoid->Build
(there you can find debug certificate SHA1 for debuging)
Go to Android Developper Console https://play.google.com/apps/publish
Select your game in Play service
Go to "linked applications"
Create a NEW linked application android and put it your debug certificate SHA1
Wait a few to changes be deployed
You will get two similar links, but with different SHA1 ( one for debugging, second for releasing)
Now, you need to clear the Android Application cache before trying to connect
Clear cache of your application
Launch your app
I solved my problem like this
That's caused by attempting to install an apk maybe from the ide with debug keystore on a device that has the production apk with the production keystore. Just go into the phones app settings and uninstall the app. I get a few of these after I test the upgrade path from the beta store and then go back to developing with the ide.
try doing it through command prompt use:
adb uninstall PACKAGE_NAME
and see if it works
also try renaming the package name just to be sure.
I feel you are trying to install google-play-services.You don't need to update google play services.From the docs:
The Google Play services APK
The Google Play services APK contains the individual Google services
and runs as a background service in the Android OS. You interact with
the background service through the client library and the service
carries out the actions on your behalf. An easy-to-use authorization
flow is also provided to gain access to the each Google service, which
provides consistency for both you and your users.
The Google Play services APK is delivered through the Google Play
Store, so updates to the services are not dependent on carrier or OEM
system image updates. In general, devices running Android 2.3
(Gingerbread) or later and have the Google Play Store app installed
receive updates within a few days. This allows you to use the newest
APIs in Google Play services and reach most of the devices in the
Android ecosystem (devices older than Android 2.3 or devices without
the Google Play Store app are not supporte

How to install newer test version of my installed android app without uninstalling it?

I have my application in Google Play, I've downloaded and installed it on my phone.
I'm also currently working on update of this application, and whenever I want to install my .apk file on my phone it shows me, that I can't do it, because the app is already here.
Where in Eclipse can I set some settings, which will allow me to install my updated app without installing original one?
EDIT
I want to have two versions on my device at the same time.
One simple solution is to change the package name, since that's how the OS identifies the .apk. Indeed, the package is unique to the Market: how does an android phone(or market) recognize an app
You can not install and run the app from eclipse because the app installed on the device (the one from play store) is signed with a different key.
When you export your app you sign the apk with a specific key and when u run it from eclipse you sign it with a different key - the debugkey.
If you HAVE to install another version on the device without uninstalling the old one from the device (the one you got from the play store) you should:
1.export your app and sign it with the same key you signed the app you uploaded to the play store.
2.upload the exported apk to the device.
3.install it.
EDIT:
If you want to versions on the same device you should change the app package name.

Categories

Resources