Goose
Goose

Reputation: 1317

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.

Upvotes: 0

Views: 1664

Answers (2)

Cheesebaron
Cheesebaron

Reputation: 24470

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.

Upvotes: 2

Alex.F
Alex.F

Reputation: 6201

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).

Upvotes: 1

Related Questions