如何在设备上部署 aab 文件? [英] How to deploy an aab file on device?

查看:67
本文介绍了如何在设备上部署 aab 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的安卓应用中,如果我想更新 APK 文件,我会使用这个:

in my android app if I want to update APK file I use this:

adb install -r some_my.apk

不错.这是工作.现在我签署了我的包,结果是 Android Studio 3.5.生成:AAB(Android App Bundle)文件.不错.

Nice. It's work. Now I sign my bundle and as result Android Studio 3.5. generate : AAB (Android App Bundle) file. Nice.

现在我从 Google Play 安装上一个应用程序.我想通过 AAB 更新我的应用.

Now I install prev app from Google Play. And I want to update my app by AAB.

我该怎么做?

如果我试试这个:

adb install -r some_my.aab

出现错误:

adb.exe: need APK file on command line

推荐答案

Android App Bundles 是一种发布格式,您不能在设备上安装 aab 文件.

Android App Bundles is a publishing format and you can't install the aab file on a device.

您可以查看官方文档.

App Bundle 与 APK 的不同之处在于您不能将其部署到设备上.相反,它是一种上传格式,将您应用的所有编译代码和资源都包含在一个构建工件中.

An app bundle is different from an APK in that you can’t deploy one to a device. Rather, it’s a upload format that includes all your app’s compiled code and resources in a single build artifact.

您可以使用 bundletool 命令.

要为所有设备配置(使用调试密钥签名)生成 APK 集,您可以使用:

bundletool build-apks --bundle=/MyApp/my_app.aab --output=/MyApp/my_app.apks

要从 APK 集部署您的应用,请使用 install-apks

To deploy your app from an APK set, use the install-apks

bundletool install-apks --apks=/MyApp/my_app.apks

这篇关于如何在设备上部署 aab 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆