Other
Probably we should upload aab instead of apk to deploy gate 馃殌
-
How do you make the apk file? It seems dynamic feature modules are not included in the apk file.
If you want to use the apk file, you should use bundletool with --mode=universal flag to create the apk file.
I strongly recommend using aab. 馃挭
I forgot to tell you. Even using the aab and uploading the DeployGate is not working dynamic feature module. Running dynamic feature module is only on play store(test track or internal app sharing).
Thanks for the details! I think uploading to both.
Anyway, it seems good to make a universal apk now. If anyone wants to do something, I would be grateful if you could raise your hand.馃檹
I tried to make universal apk. But it is failed 馃槶
java -jar bundletool.jar build-apks --mode=universal --bundle android-base/build/outputs/bundle/debug/android-base-debug.aab --output universal.apks
Error: Program type already present: $r8$backportedMethods$utility$Long$1$hashCode
[BT:0.12.0] Error: Dex merging failed.
com.android.tools.build.bundletool.model.exceptions.CommandExecutionException: Dex merging failed.
at com.android.tools.build.bundletool.mergers.D8DexMerger.translateD8Exception(D8DexMerger.java:98)
at com.android.tools.build.bundletool.mergers.D8DexMerger.merge(D8DexMerger.java:77)
at com.android.tools.build.bundletool.mergers.ModuleSplitsToShardMerger.mergeDexFiles(ModuleSplitsToShardMerger.java:397)
at com.android.tools.build.bundletool.mergers.ModuleSplitsToShardMerger.lambda$mergeDexFilesAndCache$4(ModuleSplitsToShardMerger.java:365)
at java.util.HashMap.computeIfAbsent(HashMap.java:1127)
at com.android.tools.build.bundletool.mergers.ModuleSplitsToShardMerger.mergeDexFilesAndCache(ModuleSplitsToShardMerger.java:363)
at com.android.tools.build.bundletool.mergers.ModuleSplitsToShardMerger.mergeSingleShard(ModuleSplitsToShardMerger.java:245)
at com.android.tools.build.bundletool.mergers.ModuleSplitsToShardMerger.mergeSingleShard(ModuleSplitsToShardMerger.java:184)
at com.android.tools.build.bundletool.mergers.ModuleSplitsToShardMerger.merge(ModuleSplitsToShardMerger.java:108)
at com.android.tools.build.bundletool.splitters.BundleSharder.shardBundle(BundleSharder.java:107)
at com.android.tools.build.bundletool.splitters.ShardedApksGenerator.generateSplits(ShardedApksGenerator.java:90)
at com.android.tools.build.bundletool.commands.BuildApksManager.executeWithZip(BuildApksManager.java:183)
at com.android.tools.build.bundletool.commands.BuildApksManager.execute(BuildApksManager.java:117)
at com.android.tools.build.bundletool.commands.BuildApksCommand.execute(BuildApksCommand.java:532)
at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:74)
at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:46)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
at com.android.tools.r8.utils.t.a(:55)
at com.android.tools.r8.D8.run(:6)
at com.android.tools.build.bundletool.mergers.D8DexMerger.merge(D8DexMerger.java:70)
... 14 more
Caused by: com.android.tools.r8.utils.AbortException: Error: Program type already present: $r8$backportedMethods$utility$Long$1$hashCode
at com.android.tools.r8.utils.Reporter.a(:21)
at com.android.tools.r8.utils.Reporter.a(:7)
at com.android.tools.r8.utils.t.a(:36)
... 16 more
It seems R8 bug. I found the similar issue https://issuetracker.google.com/issues/146265847
It seems R8 in the bundle tool needs to be updated once again. Pierre, can you please do that?
https://github.com/google/bundletool/blob/8f922cf4b24bb1714d06cfa303d8e79e81b71a91/build.gradle#L35
Probably we should update r8 and create a jar myself 馃槃
Most helpful comment
How do you make the apk file? It seems dynamic feature modules are not included in the apk file.
If you want to use the apk file, you should use bundletool with
--mode=universalflag to create the apk file.I strongly recommend using aab. 馃挭