Creating signed app for Xamarin.Android app

It took me a while to figure out how to create signed Android apk file using Xamarin Studio 4.2.  These are the steps i used to create a signed/zipaligned apk.

I found these steps in Xamarin forum and it works:

https://forums.xamarin.com/discussion/578/apk-signed-in-debug-mode

—————————————————————————–

The way I sign an APK with Mono for Android app:

Within Visual Studio <– Make sure dropdown is “Release” NOT “Debug” 1. Build – Clean 2. Build – Rebuild 3. Package YOUR_APP_NAME for Android (.apk)

Open folder that contains APK (c:\PATH TO MONODROID PROJECT\bin\Release 4. Copy apk file (NOT -Signed.apk) to Java folder (c:\Program Files\Java\JAVA VERSION\bin)

Open command prompt 5. redirect to java folder where you paste APK file to (cd c:\Program Files\Java…. etc) 6. sign APK with certificate (jarsigner -verbose -keystore KEYSTORE_KEY APK_FILENAME KEYSTORE_ABBREVIATION)

  1. Copy signed APK to Android-sdk folder (c:\android-sdk\tools)
  2. redirect cmd prompt to android-sdk folder (cd c:\android-sdk\tools)
  3. zip APK (zipalign -v 4 APK_FILENAME NEW_FINAL_APK_FILENAME)

That final APK file can now be uploaded to Google Play.

If you are just testing your app on a phone real quick… follow steps 1-3, then at step 4, copy the YOUR_APP_NAME-Signed.apk file to your phone and install it. That will work for testing on your phone.

———————————————–
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s