I have a xamarin forms solution with visual studio 2019 on mac. I try to publish my apk on google play console but it says that they are Unoptimised APK.
In visual studio, I went to Android project options > Android Build. In release configuration, I checked Generate one package (apk) per select ABI. In the advanced tab, I checked the 4 supported ABI. Then I published and then uploaded 4 apks to google play console.
It doesn't seem to be enough, the website advises me to: - Use the Android App Bundle to automatically optimise for device configurations (Not sure it is supported for xamarin solution) - or manage it yourself with multiple APKs (which I did with no success)
I cannot ignore the warning, the button to go to next step is grayed.
There are also a few general MSBuild settings that are helpful for improving Xamarin.Android build times. 1. DebugType A little known setting in all .csproj files is the “Debug Type” of a .NET project: portable – the cross-platform format that Mono and Xamarin supports.
Xamarin. Android This document will discuss how to build an APK that will target a single ABI using Xamarin.Android. In some situations it may be advantageous for an application to have multiple APKs - each APK is signed with the same keystore and shares the same package name but it is compiled for a specific device or Android configuration.
If you haven’t heard about Android App Bundles, Xamarin.Android will soon support App Bundles to provide users with optimized APKs per their device specifications when downloading an app from the Google Play Store or various Android App Stores.
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.
Unfortunately Xamarin Android does not yet support App Bundles. They are working on it and will be available soon: https://github.com/xamarin/xamarin-android/issues/2727
The PR for the build task is already merged: https://github.com/xamarin/xamarin-android/pull/3146
if you want to try the preview version you can try this (from the Xamarin team):
you should be able to download a visx from our CI system via the Build Status section of our README.md (see https://github.com/xamarin/xamarin-android#build-status) and then picking a Job and going to the Azure Artifacts page. Or just use this to get the latest stable build https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/lastStableBuild/Azure/
Note that these will be the Open Source bits only. So some things (like fast deployment) won't work. But if you are building a release app that should be ok.
The only thing you can do until the App Bundles support will be released, is to use one APK per ABI and ignore the warning from Google Play
Until all your GRAY CHECKS in Google Play Console (on the left side menu ) become green, you will not be allowed to publish in play console and ignore the warning.
New in Visual Studio 2019 for windows 16.4 and for Mac 8.4 added support for building android app package aab format
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