Android Cordova App not Installed issue - android

we currently have an app that has been in usage for several years now. We are currently facing an issue with deployment where users are failing to install updates to the existing app.
this is the error they see when trying to install on an android device:
As far as I can tell the app is being correctly signed with the proper certificate. I even checked the previous release apk with the new release/update apk. both the certificate seem to match perfectly.
the only thing I can recall being changed is I have switched to a newer PC, my old PC is gone and now I am working with visual studio 2017 instead of the previous visual studio 2015 to build the release apk files from cordova still using the same keystore file to sign the release apk. would switching computers impact the signing of the apk even though the keystore file is still the same?

Related

INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES

I know this question has been asked so many times here on the StackOverflow and the solution for this problem was given as "Uninstall previous version and then install"
My Problem:
I have made an app for the client and shipp that apk to him he has installed it on his devices. I have delivered him 3 to 4 APK. and all he need to do is to get the Apk and install them (this is a procedure I have made in app by downloading newest version from my server and then installing new version using installer)
Now for some reasons I have to uninstall and intall my Android studio. I also did upgrade it to new version 3.1. Now that I have to make some changes and I have to ship the new APK in debug mode. I have shipped the APK. but its just not getting installed on client devices. Also I can generate same case on my device.
I can not afford to let the client to do this work (uninstall previous version and then install the newer version)
What I found on internet? I got to know after doing some research on internet. And that is the debug.keystore is the problem. All apks needs to be signed with same certificates and keystore. I have read that its the case with the realsed version of APK but I wonder if it is the case with the debug apk too.
Any Solution ?
Now please tell me If I can get my previous keystore? can I get any thing from previous debug APK ? any solution and work around except installing and uninstalling APK ???? please help
Note:
For some reasons I have not made it release version and I also did not upload it on the server.
You should probably make a keystore(link here) and back it up somewhere safe for all your future releases. Then if you sign it from the same keystore for future builds, you should not run into these issues.
There shouldn't be a reason to ship debug apk unless your client has a specific request because the they are as the name suggests open to debugging by potential attackers.
You should also check proguard if you care for security of your apks

Android Studio Crash causing keystore issue

I recently tried to update my Android Studio and during the process is crashed. After re-installing I opened my app project pointed it to my original keystore file however my app wont update the existing version on any device as it says its signed with a different key. How do I get Android studio to sign it correctly?

Visual Studio Mac, Android release signed is older than current build

I'm using Visual Studio mac for developing Xamarin, recently I released my Android app but a rare behave happened! Releasing app popped out 2 files named app.apk and app-Signed.apk and I think the 2nd one should be the one I should upload to Google Play store (am I right?), but after opening it on my device I found out many changes that was appearing in debug app are not exist in Singned one! while app.apk is OK with changes I applied to app.
Is app.apk in debug mode?
What should be app-Signed.apk and why it has this problem and how can I fix it (if answer to #1 is true)?
Sometimes Visual Studio Mac for some reason does that. Remove obj and bin folder from a project directory, and then build again. If that happens again (2 files) the odd thing that you need to upload to google play non signed one.

Can INSTALL_FAILED_UPDATE_INCOMPATIBLE cause issue with release version?

Recently I updated my windows (from 8.1 to 10). After working on my app that I used to debug on 8.1, when I try to run from w10, I get INSTALL_FAILED_UPDATE_INCOMPATIBLE. Now I assume this is caused by different fingerprint of new Windows version, the debug version was signed by previous one and they dont match.
My question is : can this cause problem when building a release version too? Will the data of my users be wiped by this or the keystore will take care of that (because they release keystore didnt change therefore on deployed devices it wont complain)?
As long as you are using the same release keystore, then the release version will work to upgrade the current application, and no data will be lost. If the keystore changes, you cannot upgrade the application, and any new version would require a complete uninstall of the old one.
Also, if your application is on the Play Store, you would not be able to upload the APK anyway if the keystore did not match, so the error will be caught before it gets to users.

Xamarin Debug Keystore Seems to have Changed

I am developing an Android Application using Xamarin.Android in Xamarin Studio. It uses Google Play Game Services.
The project has run and tested find up until this point. Yesterday I upgraded my development PC from Windows 7 to Windows 8.1. In the process I also had to reinstall Xamarin Studio.
Now when my app attempts to connect to Google Play, it fails with error "RESULT_APP_MISCONFIGURED" which as far as I can tell means that my app is not properly authorized to access the Google Play API. However, nothing has actually changed.
I tested an older version of the app, and it is still able to connect to the Google Play API. Nothing in the code itself has changed, so I think it must be something to do with my recently upgrade of Windows, or the recent re-install of Xamarin Studio.
Any thoughts on what would help narrow down the problem? Is it possible the debug keystore has changed somehow?
An additional clue: when I attempt to build an deploy to a device that has the older, working version of the app on it, I get the following error:
Deployment failed because of an internal error: Failure
[INSTALL_FAILED_UPDATE_INCOMPATIBLE]
I then have to manually uninstall the old version before the new one can be deployed.
As has already been pointed out, the debug keystore won't be the same on all installations of Xamarin.Android. Which is expected behavior.
When using Play Services you want to create a keystore, preferably one for debug and one for release, or as different aliases in the same keystore (you figure that out).
Then you can make the build process automagically sign your app by adding some stuff to your .csproj file. You can read more about this in the docs.
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<AndroidKeyStore>True</AndroidKeyStore>
<AndroidSigningKeyStore>public.keystore</AndroidSigningKeyStore>
<AndroidSigningStorePass>MyKeystorePassword</AndroidSigningStorePass>
<AndroidSigningKeyAlias>MyKey</AndroidSigningKeyAlias>
<AndroidSigningKeyPass>MyKeyPassword</AndroidSigningKeyPass>
</PropertyGroup>
You can make a similar block for Debug as well choosing either another alias or another keystore.
Yes, debug keystore is part of the Xamarin installation and it changes if you reinstall Xamarin. You need to update the key signature on Google console, this time create a keystore and keep it hidden, keep it safe (so to speak).

Categories

Resources