安卓开发手机移动程序开发

APK搜身App Bundle使用方法

2020-12-06  本文已影响0人  九狼JIULANG

Android App Bundle是 Android 新推出的一种官方发布格式(.aab)。通过使用Android App Bundle你可以减少应用的包大小,从而提升安装成功率并减少卸载量。

只要在app下的build.gradle文件中加入bundle{}

android {
    compileSdkVersion 30
  buildToolsVersion "30.0.0"

    bundle {
        density {
            // Different APKs are generated for devices with different screen densities; true by default.
            enableSplit true
        }
        abi {
            // Different APKs are generated for devices with different CPU architectures; true by default.
            enableSplit true
        }
        language {
            // This is disabled so that the App Bundle does NOT split the APK for each language.
            // We're gonna use the same APK for all languages.
            enableSplit true
        }
    }
}
上一篇 下一篇

猜你喜欢

热点阅读