APK搜身App Bundle使用方法

作者: 九狼JIULANG | 来源:发表于2020-12-06 13:46 被阅读0次

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
        }
    }
}

相关文章

网友评论

    本文标题:APK搜身App Bundle使用方法

    本文链接:https://www.haomeiwen.com/subject/xhyowktx.html