-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bundletool build-apks has no dex files #38
Comments
The base module in your Android App Bundle does not have a dex file. Apps that don't have dex files need to have the attribute See https://developer.android.com/guide/topics/manifest/application-element |
You right, but my base app generate dex file when I add the attribute android:hasCode=false in the AndroidManifest.xml. |
Is there a dex file in your Bundle? You can look by unzipping it and searching in the |
Do you use dexguard? Somebody on stackoverflow mentioned that they had the same issue as you and updating to the latest version of dexguard fixed it. |
Yes, I use Dexguard. You right! Ty |
Found the issue after 2 days of research : |
I've been getting the same issue where it says |
This is not a help forum but an issue tracker. Try stackoverflow or other similar platforms. Sorry and thanks for your understanding! |
Describe the bug
When I used the bundletool build-apks
show the next error.
I need to use a custom Application. Any idea to fix it?
[BT:0.7.1] Error: Module 'base' has no dex files but the attribute 'hasCode' is not set to false in the AndroidManifest.xml.
com.android.tools.build.bundletool.exceptions.ValidationException: Module 'base' has no dex files but the attribute 'hasCode' is not set to false in the AndroidManifest.xml.
at com.android.tools.build.bundletool.exceptions.ValidationException$Builder.build(ValidationException.java:49)
at com.android.tools.build.bundletool.exceptions.ValidationException$Builder.build(ValidationException.java:41)
at com.android.tools.build.bundletool.validation.DexFilesValidator.validateHasCode(DexFilesValidator.java:86)
at com.android.tools.build.bundletool.validation.DexFilesValidator.validateModule(DexFilesValidator.java:58)
at com.android.tools.build.bundletool.validation.ValidatorRunner.validateBundleModulesUsingSubValidator(ValidatorRunner.java:78)
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:73)
at com.android.tools.build.bundletool.commands.BuildApksManager.execute(BuildApksManager.java:103)
at com.android.tools.build.bundletool.io.TempFiles.withTempDirectoryReturning(TempFiles.java:52)
at com.android.tools.build.bundletool.commands.BuildApksCommand.execute(BuildApksCommand.java:399)
at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:77)
at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:47)
Bundletool version(s) affected
Version: [e.g. 0.7.1]
To Reproduce
Steps to reproduce the behavior.
bundletool build-apks --bundle=/xx/xx --output=/xx/xx --ks=key.keystore --ks-pass=pass:password--ks-key-alias=xxx --key-pass=pass:password
The text was updated successfully, but these errors were encountered: