0

I am trying to upload the app to the Play Store. But when I upload the bundle I get the message that it is debuggable. I'm using Visual Studio 2022. In Android Options there is a check box to enable debugging, but I've unchecked it. And rebuilt the app and it still says it is debuggable. I've gone into Options->Debugging and clicked off all the options in General, Just-in-Time and I still get the same error. And of course I'm building the Release version.

Exiting VS and restarting fixed this problem. But now, PlayStore Console gives me this error:

Your Android App Bundle is signed with the wrong key. Ensure that your App Bundle is signed with the correct signing key and try again. Your App Bundle is expected to be signed with the certificate with fingerprint: SHA1: 50:03:40:00:03:11:63:4D:1A:0D:D2:32:D5:80:51:99:C4:B4:D4:64 but the certificate used to sign the App Bundle you uploaded has fingerprint: SHA1: 2A:40:EF:C2:7C:41:43:2A:31:C7:F0:35:0B:7E:23:77:D6:44:93:7D

Can I somehow update the certificate? Or, what?

Ron
  • 2,435
  • 3
  • 25
  • 34

1 Answers1

0

Here I used Android app (Xamarin) as a test project in visual studio.

The first issue:

how to turn off debugging in visual studio

The Android Manifest contains the android:debuggable attribute, which controls whether or not the application may be debugged. The simplest way to do this is by adding a conditional compile statement in AssemblyInfo.cs:

#if DEBUG
[assembly: Application(Debuggable=true)]
#else
[assembly: Application(Debuggable=false)]
#endif

2 The second issue:

Your Android App Bundle is signed with the wrong key. Ensure that your App Bundle is signed with the correct signing key and try again. If you have created several keystore files, please make sure to use the correct key when distributing.

Don't change the signature leave the app signed with the current key.

enter image description here

You can use the following command to find your Keystore's Signature:

keytool.exe -list -v -keystore "C:\Users\your user account\AppData\Local\Xamarin\Mono for Android\Keystore\HelloWorld2\HelloWorld2.keystore"

When run, keytool.exe should output the following text. enter image description here

You can now determined the apk has been signed with this keystore, and with the alias 'helloworld2'.(sample). Then return to Distribute window and select correct keystore file to sign.

BTW if your app is not Xamarin, you can refer to this ticket to find out which keystore was used to sign an app.

How do I find out which keystore was used to sign an app?

Dou Xu-MSFT
  • 880
  • 1
  • 1
  • 4