gpt4 book ai didi

java - 如何为常规应用程序和即时应用程序分发相同的 apk

转载 作者:行者123 更新时间:2023-11-29 18:31:25 25 4
gpt4 key购买 nike

我想在 Google Play 上将我的应用作为普通应用和免安装应用分发,普通 apk 的大小低于 4 mb,因此它也可以是免安装应用,问题是我如何在这两种应用中分发应用“模式”,使用相同的 apk/app bundle

最佳答案

虽然您仍然可以使用已弃用的模型上传 instant-app-apks.zip,但相关文档已经消失,但您可能会在此 codelab 中找到一些残余内容,正如@Hassan Ibraheem 指出的那样,您的即时应用程序将需要 targetSandboxVersion=2 而您的安装应用程序则不需要。然后,您将构建两个独立的 Artifact ,installed-app.apk 和 instant-app-apks.zip,并将它们上传到各自的版本中。

但是,以下是现在将您的应用设置为支持即时应用的官方方式,同时将一个包用于常规应用和即时应用:

另请阅读 Android Developers Blog: A simpler experience for instant apps

要同时发布免安装应用和常规应用,请执行以下步骤:

  1. Create an instant-enabled app bundle ,请注意:

If you have an existing instant app project that uses the deprecated feature plugin (com.android.feature), learn how to migrate your instant app to support Android App Bundles.

  1. 首先在 Android Instant Apps 轨道上发布支持 Instant 的 bundle 。
    • 注意:您应该只需要在这里上传一次包
  2. 导航到“已安装的应用版本”标签。
  3. 屏幕右侧应显示标有“从库中添加”的按钮,以便为您安装的应用选择 APK。

关于java - 如何为常规应用程序和即时应用程序分发相同的 apk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56060789/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com