Harshil.Chokshi
Harshil.Chokshi

Reputation: 681

How do I create apk file for a Xamarin.Android application

I am new to android development and need to create an apk file for an android application I made in Xamarin Studios so my peer can test it on his device. How can I create the apk file?

Upvotes: 0

Views: 7386

Answers (4)

SU7
SU7

Reputation: 1756

With the latest Visual Studio 2019 and the latest xamarin, I will literally walk you through all the steps:

  1. Change your project from "Debug" mode to "Release" mode like below:

enter image description here

  1. Build your android project first.

  2. Right-click on your android project -> click "Archive..."

  3. It'll show something like this: Let it complete its processing enter image description here

  4. When it's done, click the "Distribute" button, it'll open a menu like this:

enter image description here

  1. Click on the "Ad Hoc" button and click the "+" button like below:

enter image description here

  1. fill the form and click the "Create" button

enter image description here

  1. Select your saved settings and click the "Save As" button

enter image description here

  1. Chose your location to save and save the APK file and get it from where you saved it :)

Upvotes: 2

MrBootAndTheBuilding
MrBootAndTheBuilding

Reputation: 85

For even simpler/faster testing, you can:

Important:

"Use Shared Runtime" inside the project properties/Android Options must be Disabled, otherwise Mono Runtime won't be included and your app will crash on phones where Mono isn't installed.Example

Upvotes: 6

Marek Rzeźniczek
Marek Rzeźniczek

Reputation: 484

  1. Select Build menu next click Archive for Publishing
  2. Right-Click on build which do you want get apk file next select Sign and Distribute
  3. Select Ad Hock and click next button
  4. Select testing certificate and click next button
  5. Publish and choose where do you want save apk file.

Upvotes: 3

Stoyan Berov
Stoyan Berov

Reputation: 1371

For simple testing:

  1. Build the project in Release mode
  2. Go to your project's /bin/Release folder
  3. Inside the folder, you will find the required signed apk file.
  4. The apk file should now be installable simply by running it from an Android device.

Upvotes: 1

Related Questions