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