google aab超过150M大小如何优化上传谷歌商店

当Google平台的包体超过150M时,可以通过拆分Asset包并使用动态交付方式进行优化上传。步骤包括:在Asset包的build.gradle中添加插件和配置;在settings.gradle中包含Asset包;在顶级和app的build.gradle中添加相关配置;引用Google Play Core库;使用bundletool.jar构建和签名APKs;最后,通过一键打包脚本进行测试。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

google 平台包体超过 150M 如何优化上传。
第一步:
1.安卓项目中添加Assert文件夹目录结构为
在这里插入图片描述
①build.gradle文件中添加如下代码:
// In the asset pack’s build.gradle file:
apply plugin: ‘com.android.asset-pack’
assetPack {
packName = “Assert” // Directory name for the asset pack
dynamicDelivery {
deliveryType = “install-time”
}

}
②src文件夹下目录为:src\main\assets
assets文件夹下为需要添加的资源文件。

第二步:settings.gradle文件中添加依赖库
include ‘:Assert’

第三步:项目中的build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
google()
jcenter()
}

dependencies {
    classpath 'com.android.tools.build:gradle:4.1.1'
    classpath 'com.tenc
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值