How to "sign" an Android aab before submitting to the Play Store

Grime 791 Reputation points
2020-12-11T05:16:52.657+00:00

I'm relatively new (a few months) to Xamarin and have successfully created a cross platform app that I'd now like to publish to the stores. My app works fine on a raft of simulators and emulators as well as my (principal device) iPhone 11 and my (token) Android Nexus 6.

I have arbitrarily decided to publish the Android app first.

I am having trouble finding a succinct explanation of how to "sign" a new app bundle using the latest Visual Studio 2019, Version 16.8.2.

Can someone please point me to some simple and relevant documentation?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,366 questions
0 comments No comments
{count} votes

Accepted answer
  1. Grime 791 Reputation points
    2020-12-11T11:50:55.443+00:00

    Thanks JessieZhang-2116, but you were just regurgitating sites that I had seen and not been able to comprehend.

    Us newbies need a little more hand-holding.

    You mentioned:

    1) Set the build target to AAB in the project file.
    2) Uncheck signing from the APK signing option in the project options.
    3) Archive the build using VS normally.
    4) Perform an Ad-Hoc Distribution signing the AAB that way.
    5) Upload in the Google portal normally.

    With a little help from a bunch of searches, but predominantly, https://learn.microsoft.com/en-au/xamarin/android/deploy-test/signing/?tabs=windows, these are my instructions, which seem to work:

    1) Right click on Android project and select Properties > Android Options > Android Package Format > Bundle
    2) Right click on Android project and select Properties > Android Package Signing > uncheck Sign the .APK file…
    3) Right click on Android project and select Archive
    4) After Archive has completed, click on Distribute and select Ad Hoc. In the App Details Signing Identity Window, click on the plus (+) button to create a new Java Keystore or select an existing one. Resave the new .AAB. In my case, to
    C:\Users\grime\AppData\Local\Xamarin\Mono for Android\Archives\2020-12-11\Fartz.Android 12-11-20 8.38 PM.aabarchive\net.grime.apps.fartz.aab
    5) Go to the Play Store Console site. Add or select your app. Drop your bundle (aab) in the designated space. If there are no errors, click on Save at the bottom, then Review Your Release.

    2 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. JessieZhang-MSFT 7,711 Reputation points Microsoft Vendor
    2020-12-11T09:01:34.1+00:00

    Hello,

    Welcome to our Microsoft Q&A platform!

    You can try to sign the aab package with some extra msbuild arguments.
    Please check the link: https://progrunning.net/create-xamarin-forms-android-aab-and-release-to-google-play-store-with-devops/

    Besides, you can also manually sign the AAB using the following steps:

    1) Set the build target to AAB in the project file.
    2) Uncheck signing from the APK signing option in the project options.
    3) Archive the build using VS normally.
    4) Perform an Ad-Hoc Distribution signing the AAB that way.
    5) Upload in the Google portal normally.

    Refer : https://forums.xamarin.com/discussion/177025/building-an-android-bundle-with-vs19comunity

    Hope it can help you.

    Best Regards,

    Jessie Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.