Android Question Building app bundle Error [BT:1.5.0] Error: Invalid dex file indices, expecting file 'classes?.dex' but found 'classes2.dex'.

AlfaizDev

Well-Known Member
Licensed User
Hello
I installed the latest version
https://www.b4x.com/android/forum/threads/b4a-v13-0-beta-is-available-for-download.162136/

The problem occurs during the packaging process Building app bundle
When I create a new application, the packaging process is completed successfully
But this error appears when the process of packaging a pre-existing application

B4X:
B4A Version: 13.00 BETA #2
Parsing code.    (0.15s)
    Java Version: 19
Building folders structure.    (0.04s)
Running custom action.    (0.04s)
Compiling code.    (0.20s)
Compiling layouts code.    (0.01s)
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Compiling resources    (0.05s)
Linking resources    (0.39s)
    build tools: 34.0.0, android jar: android-34
Compiling generated Java code.    (0.04s)
Finding libraries that need to be dexed.    (0.01s)
Dex code    (1.10s)
Dex merge    (5.72s)
Copying libraries resources    (3.22s)
Building app bundle    Error
[BT:1.5.0] Error: Invalid dex file indices, expecting file 'classes?.dex' but found 'classes2.dex'.
com.android.tools.build.bundletool.model.exceptions.InvalidBundleException: Invalid dex file indices, expecting file 'classes?.dex' but found 'classes2.dex'.
    at com.android.tools.build.bundletool.model.exceptions.UserExceptionBuilder.build(UserExceptionBuilder.java:58)
    at com.android.tools.build.bundletool.validation.DexFilesValidator.validateDexNames(DexFilesValidator.java:78)
    at com.android.tools.build.bundletool.validation.DexFilesValidator.validateModule(DexFilesValidator.java:63)
    at com.android.tools.build.bundletool.validation.ValidatorRunner.validateBundleModulesUsingSubValidator(ValidatorRunner.java:78)
    at com.android.tools.build.bundletool.validation.ValidatorRunner.lambda$validateBundleModules$4(ValidatorRunner.java:64)
    at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:406)
    at com.android.tools.build.bundletool.validation.ValidatorRunner.validateBundleModules(ValidatorRunner.java:63)
    at com.android.tools.build.bundletool.validation.BundleModulesValidator.validate(BundleModulesValidator.java:82)
    at com.android.tools.build.bundletool.commands.BuildBundleCommand.execute(BuildBundleCommand.java:231)
    at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:71)
    at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:47)
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

AlfaizDev

Well-Known Member
Licensed User

Might be related to Windows locale.
thanks
Yes, I changed the format from Arabic to English
and it worked
but do I have to continue with this format?

Current format: English (United States)
 
Upvote 0

AlfaizDev

Well-Known Member
Licensed User
Making sure - you changed the locale back to Arabic, right?
yes
1723958795779.png
 
Upvote 0
Top