Publishing your Android app

This tutorial explains how to publish your app and create an .APK file that can be installed on an Android phone. For this tutorial, we will be using the CookieClicker app. You might also want to change the app icon and details before publishing your app.

Watch the video below or scroll down to read the step-by-step instructions.

Video

Step 1

To get started, open the solution that you wish to publish in Xamarin. You will need to create an Android Signing Key before you can publish your app. To do this, click on the Xamarin Studio Community menu and select Preferences (this might be on the File menu in Windows).

p1

Step 2

In the Preferences dialog, click on Android Signing Keys (under Publishing) and click on Create New Key.

p2

Step 3

Give your new signing certificate an alias (name) and create a password (at least 6 characters long). Then select the validity length (how many years the certificate will be valid for) and fill in at least of the text boxes with something (eg. just provide your name or your city name). Click on OK to continue.

p3a

You should then see your new signing key/certificate in the list of Android Signing Keys. Click on OK to exit the Preferences dialog.

p3b

Step 4

Select the Project menu and change your Active Configuration to Release. This will allow you to publish your app (you can change this back to Debug after you have published your app so you can return back to coding and testing your apps).

p4

Step 5

Select the Build menu and then click Archive for Publishing.

p5

Step 6

Now click on Sign and Distribute.

p6

Then select Ad-Hoc to save the app file (the .apk file) to your computer. Click on Next.

p7

Step 7

Select your signing key from the list and click Next.

p8

Then confirm you are happy with the app details and file size and click Publish.

p9

Step 8

Lastly, choose where to save your .apk file and click on Save. You can now share this file online or copy it to your phone (either by USB cable or email). You can also upload it to the Google Play store for other people to download.

p10

Step 9

After you have published your app, remember to change the project’s active configuration back to Debug by clicking on the Project menu > Active Configuration > Debug.

Important note

If you decide to upload your app to the Google Play store you must make sure that you do not violate any copyright laws (eg. check that you are not using other people’s images or sound files and that you app is not the same as an existing app). Also, make sure you have your parents’ permission before uploading any apps to the Google Play store.