是否可以将通过android app bundle生成的多个apks合并为一个可安装/可分发的apk?
我已经尝试通过adb install-multiple安装但是以这种方式,它不可分发。
Bundletool build-apks命令有一个--mode=universal
标志,允许你构建一个包含所有内容的通用APK。
它虽然在App Bundle上运行,但不是生成的APK。
可能你用过abi split。只需将universalApk true
放入您的分割中,就像下面一样,您将获得一个apk。
android {
splits {
// Configures multiple APKs based on ABI.
abi {
// Enables building multiple APKs per ABI.
enable true
// By default all ABIs are included, so use reset() and include to specify that we only
// want APKs for x86, armeabi-v7a, and mips.
reset()
// Specifies a list of ABIs that Gradle should create APKs for.
include "x86", "x86_64", "armeabi-v7a", "arm64-v8a"
// Specifies that we want to also generate a universal APK that includes all ABIs.
universalApk true
}
}
//...
}