Android Studio Crash causing keystore issue - android

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?

Related

Even after installing the new android app it is showing the older version's build error

My last published app has some issue while it got build.
java.lang.NullPointerException: Attempt to invoke virtual method 'dagger.ObjectGraph dagger.ObjectGraph.plus(java.lang.Object[])' on a null object reference
There was some issue with the build apk, not the code.
Then again we generated the new apk and published it to play store. Now, the following things happen
1- The users who didn't install the last version can successfully install and run the app from the play store.
2- The user who has installed the buggy apk are getting the same error even on uninstalling the older version and reinstalling the new app from play store.
3- One of my testing phone showing the same issue as it has installed the last version but when I went for debugging(from the android studio) with the phone it worked like a charm.
Any suggestion what can I do to fix this issue.
Kindly try this options:
1. Try Uninstalling the app and then clear the RAM
2. Choose Rebuild project option under Build menu in Android Studio
3. If any of these will not work then, do file->Invalidate caches and restart option in Android Studio.

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.

Android Cordova App not Installed issue

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?

Cannot upgrade old application by android studio generated apk file in Lollipop

I was installed old version(version 1) of my application from google play store in my phones. Now I would like to update this app to new version(version 2), so, I generated new apk file by using android studio and I upload this generated apk to google drive. Then download and install from my several devices(Android 5.1.1, and Android 4.2.2).
In android 4.2.2, I can install the downloaded apk and my application was upgraded to version 2 successfully.
In Android 5.1.1, I can click on install button, after that show the "App not installed" error message and the application was not upgraded to new version(version 2).
Could you please give me some advice?
Please see the attachment picture of android 5.1.1 device.
I think it is bug. It happened to me once while upgrading to a new version. The problem occurs when there are 2 users in Android OS(i.e. Settings>Users. Probably in your case, guest user must be present). So when app was previously installed, it must be installed for both primary and guest user. So when Android OS tries to uninstall the app to upgrade, it only uninstalls app for primary user and not for guest user. So the app is still present in the OS but not for primary user preventing installation of the new app. At least this is what I think it is.(I am using a Moto G)
But I have never encountered this bug when upgrading from playstore. It only happened when trying to upgrade app by installing apk from external source. I hope it helps...
When you upgrade your application and build for release, make sure that you sign your application with the same keystore you used to sign your previous application version.
When you use new keystore to sign your new application version and attempts to install it into the device with your application(old version) already installed, android will halt the installation and you can tell exactly why it does not install by looking at the logcat.

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