How to optimize apk per ABI when using xamarin and

2020-02-07 03:03发布

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.

2条回答
祖国的老花朵
2楼-- · 2020-02-07 03:51

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.

查看更多
劫难
3楼-- · 2020-02-07 04:02

New in Visual Studio 2019 for windows 16.4 and for Mac 8.4 added support for building android app package aab format

enter image description here

查看更多
登录 后发表回答