You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
As of v1.2.0, duplicate assets are no longer permitted.
I can see that this behaviour has been changed because resources in asset modules are uncompressed, whereas in features modules these are compressed. Can this check in bundletool only reject a collision where a clash occurs between an asset module and a feature module? It seems to me that if this resource only exists in asset modules, then there is no ambiguity between compressed or uncompressed. Please correct me if I've misunderstood. I've got an app out in the wild which was processed by the Play Store by an earlier version of bundletool that I now can't easily update.
Bundletool version(s) affected
Version: 1.2.0
Stacktrace
[BT:1.2.0] Error: Both modules 'module1' and 'module2' contain asset entry 'assets/img123.webp'.
com.android.tools.build.bundletool.model.exceptions.InvalidBundleException: Both modules 'module1' and 'module2' contain asset entry 'assets/img123.webp'.
at com.android.tools.build.bundletool.model.exceptions.UserExceptionBuilder.build(UserExceptionBuilder.java:58)
at com.android.tools.build.bundletool.validation.EntryClashValidator.checkEntryClash(EntryClashValidator.java:85)
at com.android.tools.build.bundletool.validation.EntryClashValidator.lambda$checkEntryClashes$0(EntryClashValidator.java:64)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.stream.IntPipeline$1$1.accept(IntPipeline.java:180)
at java.base/java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:104)
at java.base/java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:699)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312)
at com.google.common.collect.CollectSpliterators$1WithCharacteristics.forEachRemaining(CollectSpliterators.java:65)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at com.android.tools.build.bundletool.validation.EntryClashValidator.checkEntryClashes(EntryClashValidator.java:60)
at com.android.tools.build.bundletool.validation.EntryClashValidator.validateAllModules(EntryClashValidator.java:51)
at com.android.tools.build.bundletool.validation.ValidatorRunner.validateBundleModulesUsingSubValidator(ValidatorRunner.java:75)
at com.android.tools.build.bundletool.validation.ValidatorRunner.validateBundleUsingSubValidator(ValidatorRunner.java:69)
at com.android.tools.build.bundletool.validation.ValidatorRunner.lambda$validateBundle$3(ValidatorRunner.java:58)
at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:406)
at com.android.tools.build.bundletool.validation.ValidatorRunner.validateBundle(ValidatorRunner.java:58)
at com.android.tools.build.bundletool.validation.AppBundleValidator.validate(AppBundleValidator.java:104)
at com.android.tools.build.bundletool.commands.BuildApksCommand.execute(BuildApksCommand.java:607)
at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:75)
at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:47)
To Reproduce
Create two bundles with a duplicate asset. Run build-apks
Expected behavior
Duplicate asset names are permitted if file contents are identical and asset only exists in asset modules.
The text was updated successfully, but these errors were encountered:
Thank you for reporting this, will fix in the next release. Could you please share your usecase, why do you need the same file between different asset modules?
We have a large database of image assets for use in a battery of cognitive tests. Assets packs are downloaded for specific instances of a given task. Some images are reused between different types of tasks and consequently exist in different asset packs. Alternative strategies exist, but would be quite an upheaval for our asset generation mechanism (which is shared with a parallel implementation on iOS, where overlapping asset tags are permitted).
Describe the bug
As of v1.2.0, duplicate assets are no longer permitted.
I can see that this behaviour has been changed because resources in asset modules are uncompressed, whereas in features modules these are compressed. Can this check in bundletool only reject a collision where a clash occurs between an asset module and a feature module? It seems to me that if this resource only exists in asset modules, then there is no ambiguity between compressed or uncompressed. Please correct me if I've misunderstood. I've got an app out in the wild which was processed by the Play Store by an earlier version of bundletool that I now can't easily update.
Bundletool version(s) affected
Version: 1.2.0
Stacktrace
To Reproduce
Create two bundles with a duplicate asset. Run build-apks
Expected behavior
Duplicate asset names are permitted if file contents are identical and asset only exists in asset modules.
The text was updated successfully, but these errors were encountered: