简体   繁体   English

如何使用 Xamarin Visual Studio 2015 构建 Android App Bundle?

[英]How to build Android App Bundle using Xamarin Visual Studio 2015?

I see that Google Play doesn't allow apk format anymore, it requires Android App Bundle.我看到 Google Play 不再支持 apk 格式,它需要 Android App Bundle。

This article said: 这篇文章说:

To enable support for Android App Bundles, you'll need to opt-in to the bundle value of the Android Package Format property within your Android options.要启用对 Android App Bundle 的支持,您需要在 Android 选项中选择加入 Android Package Format 属性的捆绑包值。 As you do this, ensure you change your project to a Release configuration as app bundles are intended for release packages only.执行此操作时,请确保将项目更改为发布配置,因为应用程序包仅用于发布包。 To do this you can follow these steps:为此,您可以按照以下步骤操作:

 1. Right click your project, and select Properties. 2. Navigate to Android Options. 3. Change your configuration to Release. 4. Change the Android Package Format to bundle.

Android 包格式图片

But I can't find that option in my Visual Studio 2015's Android Options.但我在 Visual Studio 2015 的 Android 选项中找不到该选项。 VS 2015 Android 选项图像

I want to stick to Visual Studio 2015 because I don't have time to upgrade (also upgrade software on the old hardware may cause lag, I may need to buy a new laptop which I really don't want).我想坚持使用 Visual Studio 2015,因为我没有时间升级(在旧硬件上升级软件也可能会导致延迟,我可能需要购买一台我真的不想要的新笔记本电脑)。 Is there a way I can build Android App Bundle using Visual Studio 2015 (or using Tool from Google?) or I have to install Visual Studio 16.4 or higher on Windows?有没有一种方法可以使用 Visual Studio 2015(或使用 Google 的工具?)构建 Android App Bundle,或者我必须在 Windows 上安装 Visual Studio 16.4 或更高版本?

For Visual Studio 2019, go to the property of the Xamarin.Android project.对于 Visual Studio 2019,go 到 Xamarin.Android 项目的属性。 Under the "Android Options" side menu, select "bundle" for the "Android Package Format".在“Android 选项”侧边菜单下,select“bundle”为“Android Package 格式”。

在此处输入图像描述

I think you can't do this in Visual Studio 2015 ,because this feature was added in Visual Studio 2019 16.4 .我认为您不能在Visual Studio 2015中执行此操作,因为此功能已添加到Visual Studio 2019 16.4中。

You could check the release-notes https://learn.microsoft.com/en-us/visualstudio/releases/2019/release-notes-v16.4#16.4.0 .您可以查看发行说明https://learn.microsoft.com/en-us/visualstudio/releases/2019/release-notes-v16.4#16.4.0

You can also create App Bundles from AppCenter and push the build to Playstore directly through it.您还可以从 AppCenter 创建 App Bundle,并通过它直接将构建推送到 Playstore。

Check this blog.查看此博客。 https://devblogs.microsoft.com/xamarin.android-app-bundles-azure-devops/ https://devblogs.microsoft.com/xamarin.android-app-bundles-azure-devops/

Check this documentation if you are not familiar with the app center.如果您不熟悉应用中心,请查看此文档。 https://learn.microsoft.com/en-us/appcenter/ https://learn.microsoft.com/en-us/appcenter/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM