0

We upgraded to the latest Gradle 7.2. Before the upgrade, it used to work

While generating the apk file from the aab using the bundletool, MANIFEST.MF file is not buldled in the apk. And the MANIFEST.MF file is present in the aab.

If I generate an apk from the Android Studio, then the MANIFEST.MF file is present.

Here is the code snippet.

java -jar bundletool-all-1.10.0.jar build-apks --bundle=${OUTPUT_AAB} \
--output=${OUTPUT_APKS} \
--overwrite \
--mode=universal \
--ks=app/${storeFile} \
--ks-pass=pass:${storePassword} \
--ks-key-alias=${keyAlias} \
--key-pass=pass:${keyPassword}
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community May 09 '22 at 12:40

1 Answers1

0

That is working as intended.

The MANIFEST.MF file exists only when the APK is signed with v1 signing scheme. V1 signing scheme is only necessary when your app targets (through the minSdkVersion) devices below 25 (Android N).

Bundletool generates a various set of APKs depending on various device features (Android version, screen density, chip architecture, etc.). Some of those APKs will be served only to devices with Android 25+ so don't need v1 signing scheme and will only need v2+ signing scheme.

Signing with v1 scheme is quite slow and it adds to the size of the APK, that's why bundletool will only do it if strictly necessary.

Pierre
  • 15,865
  • 4
  • 36
  • 50
  • Thanks, Pierre. But it used to work with the old Gradle 5.6.4 and with the same bundletool. Is there any way to bundle this .MF file which we need for one of our dependency lib. – Ashok Tallapelli May 10 '22 at 07:12
  • I'm not sure if there's a way to force signing with v1 with recent versions of AGP. That seems wrong though, I'd probably file a bug for that library so they stop relying on the presence of this file. – Pierre May 10 '22 at 10:05