android - Android InvalidBundleException:没有模块的捆绑包
问题描述
我有一个用于自动化管道的 Android Bundle,我在其中使用一些 PowerShell 脚本来修改其中的一些数据。我所做的是将 i 重命名为 .zip,解压缩,然后再次压缩,然后将其重命名为 .aab。
但是当尝试在 Google Play Console 中上传或使用 bundletool 生成 apk 时,我收到以下错误:
com.android.tools.build.bundletool.model.exceptions.InvalidBundleException: Bundle without modules.
at com.android.tools.build.bundletool.model.exceptions.UserExceptionBuilder.build(UserExceptionBuilder.java:58)
at com.android.tools.build.bundletool.validation.BundleValidationUtils.lambda$isAssetOnlyBundle$0(BundleValidationUtils.java:74)
at java.util.Optional.orElseThrow(Unknown Source)
at com.android.tools.build.bundletool.validation.BundleValidationUtils.isAssetOnlyBundle(BundleValidationUtils.java:72)
at com.android.tools.build.bundletool.validation.ModuleNamesValidator.validateAllModules(ModuleNamesValidator.java:90)
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:106)
at com.android.tools.build.bundletool.commands.BuildApksCommand.execute(BuildApksCommand.java:678)
at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:77)
at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:49)
我正在使用[System.IO.Compression.ZipFile]::ExtractToDirectory
和解[System.IO.Compression.ZipFile]::CreateFromDirectory
压缩/压缩。我不能使用 Commpress-Archive/Expand-Archive,因为它需要更高的 PowerShell 版本。
在解压缩之前,捆绑包工作正常。知道为什么解压缩/压缩会破坏捆绑包吗?
先感谢您!
解决方案
推荐阅读
- ios - NSFaceIDUsageDescription 用于 Face ID 使用说明。touch ID 使用说明如何?
- c - 哪个是为树的每个节点生成唯一键的最佳散列函数?
- docker - 如何在 docker-compose 中将主机网络与默认网络结合起来
- javascript - 带有附件的 Sharepoint 自定义表单
- c++11 - 带有自动声明链的 C++ 类型推导
- javascript - 淡入完成后淡出后的异步/等待超时
- appium - 无法从 Appium CLI 和 Appium Desktop 启动会话
- python - 如何在html中获取链接开始结束位置
- c# - 返回实现接口的对象作为所述接口
- java - 如何以角度 8 显示存储到字符串(java)中的值?