Beta B4A v12.0 beta is available for download

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm happy to release a new version of B4A. This version brings an updated Android, Google, AndroidX and Firebase SDKs.
You must download an updated Android SDK + additional resources, to use the new version.

SDK instructions:

1. Download Windows command line tools: https://developer.android.com/studio#command-line-tools-only
2. Download additional components: https://b4xfiles-4c17.kxcdn.com/b4a/resources_11_22.zip
It is recommended to use a tool such as 7zip to unpack the zip files.
The folders should look like this:

1667204556790.png


3. Download B4A v12.0 BETA: https://www.b4x.com/android/files/beta.exe
4. Tools - Configure Paths. Set the path to android.jar to android-33: <android sdk>\platforms\android-33\android.jar

Improvements:

  1. Updated Android, Google, AndroidX and Firebase SDKs.
  2. Updated libraries: B4XTable v1.23, B4XPages template, FirebaseAdmob2 v3.0, FirebaseAnalytics v3.0, FirebaseAuth v3.0, FirebaseStorage v3.0, FirebaseNotifications v3.0, AppCompat v4.01, USB v1.01, BCTextEngine v1.94, Phone v2.53, GooglePlayBilling v5.0, Core v11.81, NFC v2.02, DesignerUtils v1.04, Facebook v2.0 (external library - to be released soon).
  3. Bug fixes and minor improvements.
 

asales

Expert
Licensed User
Longtime User
Error Building App Bundle
1. The Compiler window looking into TOOLS folder for the bundle tool instead of the CMDLINE-TOOLS
2. Package does not contain Bundletools.jar (It was extracted with 7zip)
Same error here:
B4X:
Building app bundle    Error
C:\Android\tools\bin\bundletool.jar
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
The bundletool.jar is indeed missing from the package. I'm uploaded a new one that does include it.

You can also download it from: https://www.b4x.com/android/files/bundletool.jar
You should copy it to <android sdk>\build-tools
The IDE searches for resources in several paths.
 
Upvote 0

Rubsanpe

Active Member
Licensed User
Error Building App Bundle
1. The Compiler window looking into TOOLS folder for the bundle tool instead of the CMDLINE-TOOLS
2. Package does not contain Bundletools.jar (It was extracted with 7zip)

B4X:
B4A Version: 12.00 BETA #1
Parsing code.    (0.71s)
    Java Version: 11
Building folders structure.    (0.16s)
Compiling code.    (0.41s)
   
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.07s)
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Compiling resources    (0.34s)
Linking resources    (4.11s)
Compiling generated Java code.    (5.16s)
Finding libraries that need to be dexed.    (0.38s)
Dex code    (3.78s)
Dex merge    (7.76s)
Copying libraries resources    (8.77s)
Building app bundle    Error
C:\android33\tools\bin\bundletool.jar

3. When I manually created the missing tools\bin location and placed the bundletool.jar I get this error

B4X:
B4A Version: 12.00 BETA #1
Parsing code.    (0.13s)
    Java Version: 11
Building folders structure.    (0.13s)
Compiling code.    (0.50s)
   
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.07s)
Organizing libraries.    (1.05s)
    (AndroidX SDK)
Compiling resources    (0.36s)
Linking resources    (13.41s)
Compiling generated Java code.    (65.50s)
Finding libraries that need to be dexed.    (0.05s)
Dex code    (9.87s)
Dex merge    (8.53s)
Copying libraries resources    (12.02s)
Building app bundle    Error
[BT:1.5.0] Error: File 'root/classes.dex' uses reserved file or directory name 'classes.dex'.
com.android.tools.build.bundletool.model.exceptions.InvalidBundleException: File 'root/classes.dex' uses reserved file or directory name 'classes.dex'.
    at com.android.tools.build.bundletool.model.exceptions.UserExceptionBuilder.build(UserExceptionBuilder.java:58)
    at com.android.tools.build.bundletool.validation.BundleFilesValidator.validateModuleFile(BundleFilesValidator.java:131)
    at com.android.tools.build.bundletool.validation.ValidatorRunner.validateBundleModulesUsingSubValidator(ValidatorRunner.java:81)
    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)
Hi. Same error here.

B4X:
B4A Versión: 12.00 BETA #1
Parseando código.    (0.79s)
    Java Versión: 19
Building folders structure.    (0.13s)
Compilando código.    (0.45s)
Compilado códigos de diseños.    (0.05s)
Organizando librerías.    (0.00s)
    (AndroidX SDK)
Compilando los recursos    (0.10s)
Enlazando los recursos    (0.85s)
Compilando el código Java generado.    (0.14s)
Buscando librerias que necesitan ser dexed.    (0.03s)
Dex code    (0.86s)
Dex merge    (7.41s)
Copiando los recursos de librerias    (19.88s)
Building app bundle    Error
[BT:1.5.0] Error: File 'root/classes.dex' uses reserved file or directory name 'classes.dex'.
com.android.tools.build.bundletool.model.exceptions.InvalidBundleException: File 'root/classes.dex' uses reserved file or directory name 'classes.dex'.
    at com.android.tools.build.bundletool.model.exceptions.UserExceptionBuilder.build(UserExceptionBuilder.java:58)
    at com.android.tools.build.bundletool.validation.BundleFilesValidator.validateModuleFile(BundleFilesValidator.java:131)
    at com.android.tools.build.bundletool.validation.ValidatorRunner.validateBundleModulesUsingSubValidator(ValidatorRunner.java:81)
    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)

Rubén
 
Upvote 0

asales

Expert
Licensed User
Longtime User
I use OpenJDK 11.
I download the package again.

Same error here:
B4X:
Building app bundle    Error
[BT:1.5.0] Error: File 'root/classes.dex' uses reserved file or directory name 'classes.dex'.
com.android.tools.build.bundletool.model.exceptions.InvalidBundleException: File 'root/classes.dex' uses reserved file or directory name 'classes.dex'.
 
Upvote 0

Rubsanpe

Active Member
Licensed User
1. I don't think that it is related but you are using a wrong version of Java. Switch to OpenJDK 11, 14 or Java 8.
2. Create a new project and choose Project - Build AAB. Do you get the same error?
Hi. Tested with version 11. Same error

B4X:
B4A Versión: 12.00 BETA #1
Parseando código.    (0.80s)
    Java Versión: 11
Building folders structure.    (0.14s)
Compilando código.    (0.47s)
Compilado códigos de diseños.    (0.05s)
Organizando librerías.    (0.00s)
    (AndroidX SDK)
Compilando los recursos    (0.11s)
Enlazando los recursos    (0.76s)
Compilando el código Java generado.    (0.14s)
Buscando librerias que necesitan ser dexed.    (0.08s)
Dex code    (1.02s)
Dex merge    (7.78s)
Copiando los recursos de librerias    (22.77s)
Building app bundle    Error
[BT:1.5.0] Error: File 'root/classes.dex' uses reserved file or directory name 'classes.dex'.
com.android.tools.build.bundletool.model.exceptions.InvalidBundleException: File 'root/classes.dex' uses reserved file or directory name 'classes.dex'.
    at com.android.tools.build.bundletool.model.exceptions.UserExceptionBuilder.build(UserExceptionBuilder.java:58)
    at com.android.tools.build.bundletool.validation.BundleFilesValidator.validateModuleFile(BundleFilesValidator.java:131)
    at com.android.tools.build.bundletool.validation.ValidatorRunner.validateBundleModulesUsingSubValidator(ValidatorRunner.java:81)
    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)

I have tried deleting the entire contents of the Objects folder with the same result.

Rubén
 
Last edited:
Upvote 0

asales

Expert
Licensed User
Longtime User
I need a project that reproduces it. Can you send me one to [email protected]?
Here:
(edit)
(need to include: #MultiDex: True)
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I've uploaded beta #2. This should fix the issue with bundletool:

com.android.tools.build.bundletool.model.exceptions.InvalidBundleException: File 'root/classes.dex' uses reserved file or directory name 'classes.dex'.

Download link: https://www.b4x.com/android/files/beta.exe

Note that this fix goes quite deep so it is worth testing. Thanks!
 
Upvote 0

mcqueccu

Well-Known Member
Licensed User
Longtime User
I've uploaded beta #2. This should fix the issue with bundletool:

com.android.tools.build.bundletool.model.exceptions.InvalidBundleException: File 'root/classes.dex' uses reserved file or directory name 'classes.dex'.

Download link: https://www.b4x.com/android/files/beta.exe

Note that this fix goes quite deep so it is worth testing. Thanks!
A project which was previously giving that error now compiles fine. Even with jdk 18 it still works.

Good work always @Erel
 
Upvote 0

panagiotisden2

Active Member
Licensed User
Longtime User
Hello, i have installer v12.0 BETA, installed new sdk and everything, i recompiled an existing project which was working fine with v11.80, it compiles and runs fine until i start an activity which uses the AcceleratedSurface lib, this throws the following error:
B4X:
** Activity (main) Pause, UserClosed = false **
testgronCreate (java line: 38)
java.lang.NoClassDefFoundError: Failed resolution of: Lflm/b4a/accelerview/AcceleratedCanvas;
    at java.lang.reflect.Executable.getParameterTypesInternal(Native Method)
    at java.lang.reflect.Method.getParameterTypes(Method.java:186)
    at java.lang.Class.getDeclaredMethods(Class.java:1915)
    at anywheresoftware.b4a.BA.loadHtSubs(BA.java:522)
    at com.orionapps.superexcellentapp.testgr.onCreate(testgr.java:38)
    at android.app.Activity.performCreate(Activity.java:8290)
    at android.app.Activity.performCreate(Activity.java:8269)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3657)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3813)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7898)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: java.lang.ClassNotFoundException: flm.b4a.accelerview.AcceleratedCanvas
    ... 21 more

I noticed that AcceleratedSurface is present in the Jetifier window but when i try to jetify it throws this error:

B4X:
Library: AcceleratedSurface.jar
java.lang.ArrayIndexOutOfBoundsException: 7

The project was working fine before and the only thing i changed was adding #MultiDex: True cause it wouldn't compile without it with B4A v12.00

Did i miss something or is this a bug?

Thanks!
Note: i also tried with beta #2 and beta #1, i get the same results.
 
Upvote 0
Top