【问题标题】:How to optimize apk per ABI when using xamarin and visual studio?使用 xamarin 和 Visual Studio 时如何优化每个 ABI 的 apk?
【发布时间】:2019-10-22 23:27:02
【问题描述】:

我在 mac 上有一个带有 Visual Studio 2019 的 xamarin 表单解决方案。 我尝试在 Google Play 控制台上发布我的 apk,但它说它们是未优化的 APK

在 Visual Studio 中,我转到了 Android 项目选项 > Android Build。 在发布配置中,我检查了为每个选择的 ABI 生成一个包 (apk)。在高级选项卡中,我检查了 4 个支持的 ABI。然后我发布并上传了 4 个 apk 到 google play 控制台。

这似乎还不够,该网站建议我: - 使用 Android App Bundle 自动优化设备配置(不确定是否支持 xamarin 解决方案) - 或使用多个 APK 自行管理(我没有成功)

我不能忽略警告,进入下一步的按钮是灰色的。

【问题讨论】:

    标签: android visual-studio xamarin apk google-play-console


    【解决方案1】:

    很遗憾,Xamarin Android 尚不支持 App Bundle。 他们正在努力,很快就会推出: https://github.com/xamarin/xamarin-android/issues/2727

    构建任务的 PR 已经合并:https://github.com/xamarin/xamarin-android/pull/3146

    如果您想试用预览版,可以试试这个(来自 Xamarin 团队):

    您应该能够通过 README.md 的 Build Status 部分从我们的 CI 系统下载 visx(请参阅 https://github.com/xamarin/xamarin-android#build-status),然后选择一个 Job 并转到 Azure Artifacts 页面。或者只是使用它来获取最新的稳定版本https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/lastStableBuild/Azure/

    请注意,这些只是开源位。所以有些事情(比如快速部署)是行不通的。但是,如果您正在构建一个发布应用程序,那应该没问题。

    在 App Bundles 支持发布之前,您唯一能做的就是每个 ABI 使用一个 APK 并忽略来自 Google Play 的警告

    在您在 Google Play 控制台(左侧菜单)中的所有 GREY CHECKS 变为绿色之前,您将无法在 Play 控制台中发布并忽略警告。

    【讨论】:

    • 我不能忽略警告,进入下一步的按钮是灰色的。
    • 我编辑了答案,检查最后一段。我刚刚为我的应用发布了一个新的 apk,它可以正常工作
    • 确实有效,我接受了你的回答。感谢您的帮助:)
    【解决方案2】:

    Visual Studio 2019 for windows 16.4for Mac 8.4 中的新功能 增加了对构建 android 应用包 aab 格式的支持

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-05-21
      • 1970-01-01
      • 1970-01-01
      • 2016-08-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-05
      相关资源
      最近更新 更多