在Android Studio 3.2中使用构建捆绑包选项 [英] Use of Build Bundle Option in Android studio 3.2

查看:107
本文介绍了在Android Studio 3.2中使用构建捆绑包选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道Android Studio 3.2中的 Build Bundle 选项有什么用途

这是一张图片

解决方案

什么是App Bundle?

Android应用程序捆绑包是一种新的上传格式,其中包含您应用程序的所有已编译代码和资源,但会延迟APK的生成并登录到Google Play.

Google Play的新应用程序投放模型(称为动态投放),然后使用您的应用程序捆绑包为每个用户的设备配置生成并提供优化的APK,因此他们仅下载运行您的应用程序所需的代码和资源.您不再需要构建,签名和管理多个APK以支持不同的设备,并且用户可以获得更小,更优化的下载

应用捆绑包的使用

  1. 动态投放:

动态交付是Google Play的新应用服务模型,它使用您的应用捆绑包为每个用户的设备配置生成并提供优化的APK,因此他们仅下载运行您的应用所需的代码和资源.例如,如果用户将英语设置为默认语言,则不需要其他语言的字符串.

  1. 动态功能模块:

动态功能模块允许您从应用程序的基本模块中分离某些功能和资源,并将其包含在应用程序包中.通过动态交付,用户可以在以后已经安装了应用程序的基本APK之后按需下载并安装这些组件.您可以使用播放核心库,您可以根据要求下载这些模块./p>

在左侧:一个简单的应用程序,其中包括基本APK(B)和一些配置APK(C).右侧:一个更复杂的应用程序,其中包括两个动态功能APK(D)和相应的配置APK(C),可按需下载.

  1. 不需要多个APK:

动态投放会处理拆分后的apk.动态交付的基本组成部分是Android 5.0(API级别21)及更高版本上可用的拆分APK机制.借助拆分的APK,Google Play可以将大型应用分解为较小的离散包,并根据需要安装在用户设备上.

基于以下内容优化APK内容:

  • 语言环境
  • 屏幕密度
  • CPU体系结构

可以在此处找到更多信息.

  1. 较小的Apk大小:

由于应用程序分成较小的部分,这意味着当用户下载您的应用程序时,该应用程序的尺寸将变小.平均而言,通过应用捆绑发布的应用的大小要小20%.

测试应用捆绑包

构建Android应用捆绑包后,您应该测试Google Play如何使用它生成APK,以及将这些APK部署到设备后的行为.您应考虑通过两种方法测试应用程序捆绑包:

来源

I want to know what is the use Build Bundle Option in Android studio 3.2

Here is a image

解决方案

What is App Bundle?

An Android App Bundle is a new upload format that includes all your app’s compiled code and resources, but defers APK generation and signing to Google Play.

Google Play’s new app serving model, called Dynamic Delivery, then uses your app bundle to generate and serve optimized APKs for each user’s device configuration, so they download only the code and resources they need to run your app. You no longer have to build, sign, and manage multiple APKs to support different devices, and users get smaller, more optimized downloads

Uses of App Bundle

  1. Dynamic Delivery :

Dynamic Delivery is Google Play's new app serving model, and it uses your app bundle to generate and serve optimized APKs for each user's device configuration, so they download only the code and resources they need to run your app. For example, user won't need other languages strings if he have set English as his default language.

  1. Dynamic feature modules :

Dynamic feature modules allow you to separate certain features and resources from the base module of your app and include them in your app bundle. Through Dynamic Delivery, users can later download and install those components on demand after they've already installed the base APK of your app. You can use Play Core Library you can download these modules when requested .

On the left: a simple app that includes a base APK (B) and some configuration APKs (C). On the right: a more complex app that includes two dynamic feature APKs (D) and corresponding configuration APKs (C) for download on demand.

  1. No need for having multiple APKs :

The dynamic delivery takes care of the split apk . A fundamental component of Dynamic Delivery is the split APK mechanism available on Android 5.0 (API level 21) and higher. With split APKs Google Play can break up a large app into smaller, discrete packages that are installed on a user's device as required.

optimizing the APK content are based on the following:

  • Locale
  • Screen density
  • CPU architecture

More info can be found here

  1. Smaller Apk size :

As app are broke in smaller parts , that means when user downloads you app it will be of smaller size for him . On average, apps published with app bundles are 20% smaller in size.

Testing App Bundles

After you build your Android App Bundle, you should test how Google Play uses it to generate APKs and how those APKs behave when deployed to a device. There are two ways you should consider testing your app bundle:

Sources

这篇关于在Android Studio 3.2中使用构建捆绑包选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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