Create apk file using Visual Studio 2015

I created a project by clicking a button, it can successfully work on the emulator. I am trying to install it on an Android mobile (Moto G) because I am looking for a file (.apk) in my project and it will find it on bin/debug/filname.apk . In this bin folder, I have 2 apk files filename.apk and filename.signed.apk . I copied both apk files to my mobile phone and tried to install filename.apk , but it could not install, and then I will try to install filename.signed.apk , which it installed successfully. But when I try to open it on my mobile phone, it automatically closes.

I tried google search but got no solution.

+6
source share
2 answers

Right-click the application name in Solution Explorer

Go to "Properties"> "Android Settings"

uncheck the "use shared runtime" box.

Save and this !!!

This step may need to be repeated if xamarin is updated again. "Export Android package (.apk)" in the context menu will now be enabled, and you can continue creating apk. Happy programming !!!

+3
source

Is the app ready for Google Play? Check link

Else

Open Project Properties> Android Settings

Set the configuration to "Release"

In the "Packaging" tab, disable:

  • Custom runtime
  • Generate one package (.apk) for the selected ABI

* In the "Advanced" tab, disable:

  • x86
  • x86_64

* Make sure all hands are checked.

If you are using Visual Studio 2017 (15.0.0 + 26228.9), you can simply change the build to the AppStore. Then deploy it to the target device.

You can find 2 APKs generated by Visual Studio 2017:

<i> /project-folder/bin/Release/my-app.apk>
<i> /project-folder/bin/Release/my-app-Signed.apk


Signed APKs are debugging APKs used by visual studio.

+1
source

All Articles