I don't want to build a release APK. I simply compile my xamarin app, with the Debug target selected, and then I look in my /bin/Debug/ folder and I only see .dll, .dll.mdb, .pdb files, but no .apk file.
To create the APK file, right-click the Xamarin. Android project in the Solution Explorer and select Archive... This will open the Archive manager and begin archiving the project, preparing to create the APK file. When it finishes archiving the project, click in Distribute... to proceed.
To start debugging an APK, click Profile or debug APK from the Android Studio Welcome screen. Or, if you already have a project open, click File > Profile or Debug APK from the menu bar. In the next dialog window, select the APK you want to import into Android Studio and click OK.
Manual InstallationCopy the file to your Android device's physical memory or an SD card and then run the file from your device. Android, by default, blocks installation of Apps that are not from PlayStore. To install your App, you must enable it to accept the App installation from the Settings.
answer re: How to generate an .apk file from Xamarin.Forms Project using Visual Studio? You need to change Your Project Mode from debug to release. Rebuild your project. Go to Solution Explorer -> Android project (right click) --> Archive --> Distribute -- AdHoc --> Sign & Add Details --> Save As
The following build targets are defined for Xamarin.Android projects. Builds the source code within a project and all dependencies. This target does not create an Android package ( .apk file). To create an Android package, use the SignAndroidPackage target, or set the `$ (AndroidBuildApplicationPackage) property to True when building:
To debug our application using a different runtime configuration, simply click the configuration you wish to use from the toolbar dropdown in Xamarin Studio. This is awesome, because we can now easily change options for our app back-and-forth with the click of a button.
The first task in preparing this package is to build the application for release, which mainly entails setting some application attributes. Use the following steps to build the app for release: Specify the Application Icon– Each Xamarin.Android application should have an application icon specified.
To get the .apk set the build to Release mode and go to Project->Create Android Package
In Xamarin version 6.3:
Source:https://developer.xamarin.com/Guides/Android/Deployment,_Testing,_and_Metrics/publishing_an_application/Part_1_-_Preparing_an_Application_for_Release/#Archive_for_Publishing
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With