Hi all,
some days ago I released the B4J WebGL Library
Now I'm happy to inform all users that I have almost completed writing the WebGL library for B4A, but now there are some problems converting it as compiled library.
Almost everything works, already some demos have been tested and works well on Android Emulator, at 50-60 FPS or less depending of the scene complexity.
I don't have a super PC, just a Ryzen7 minipc with integrated Vega 8 1.2Ghz video card, and the emulator consume 50-80% of CPU when render pretty complex full scenes, so this is really promising..... I have not yet tested on physical devices but I will do it soon.
The library was developed on top of a B4XPages project, with the inline class everything works, but if I compile the class and then import it into
another instance of the IDE creating another new B4XPages project, some error occours when compile the project.
Because probably there are more issues compiling it as library and use in a new project the compiled library, I will start here showing the first error.
After compiling a new blank project importing the compiled library the compiler show me this error:
Please, someone know the reason for this error ?
Many Thanks
Max
some days ago I released the B4J WebGL Library
Now I'm happy to inform all users that I have almost completed writing the WebGL library for B4A, but now there are some problems converting it as compiled library.
Almost everything works, already some demos have been tested and works well on Android Emulator, at 50-60 FPS or less depending of the scene complexity.
I don't have a super PC, just a Ryzen7 minipc with integrated Vega 8 1.2Ghz video card, and the emulator consume 50-80% of CPU when render pretty complex full scenes, so this is really promising..... I have not yet tested on physical devices but I will do it soon.
The library was developed on top of a B4XPages project, with the inline class everything works, but if I compile the class and then import it into
another instance of the IDE creating another new B4XPages project, some error occours when compile the project.
Because probably there are more issues compiling it as library and use in a new project the compiled library, I will start here showing the first error.
After compiling a new blank project importing the compiled library the compiler show me this error:
It show that b4xbitset is defined multiple times and I don't know because this happen.B4A Versione: 13.00
Analisi del Codice. (0.09s)
Java Versione: 19
Building folders structure. (0.04s)
Esecuzione azione personalizzata. (0.10s)
Compilazione del codice. (0.13s)
Compilazione del codice di layouts (0.00s)
Organizzazione Librerie. (0.00s)
(AndroidX SDK)
Compilazione risorse (0.12s)
Collegamento risorse (20.40s)
build tools: 34.0.0, android jar: android-34
Compilazione del codice Java prodotto. (0.02s)
Ricerca librerie che necessitano di essere "dexed". (0.01s)
Dex code (2.19s)
Dex merge Error
Error in C:\Android-SDK\tools\..\extras\b4a_local\unpacked-webgl-63871162194874\dex_v1\webgl.zip:classes.dex:
Type b4a.example.b4xbitset is defined multiple times: C:\Android-SDK\tools\..\extras\b4a_local\unpacked-webgl-63871162194874\dex_v1\webgl.zip:classes.dex, C:\Users\Massimo\Documents\PROGETTI_B4A\ESEMPI MIE LIBRERIE\WebGL_Demos\WebGL_Library_Demo\B4A\Objects\dexed\b4a\example\b4xbitset.dex
Compilation failed
Exception in thread "main" java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Android-SDK\tools\..\extras\b4a_local\unpacked-webgl-63871162194874\dex_v1\webgl.zip:classes.dex
at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:1269)
at com.android.tools.r8.D8.main(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:5)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Android-SDK\tools\..\extras\b4a_local\unpacked-webgl-63871162194874\dex_v1\webgl.zip:classes.dex
at Version.fakeStackEntry(Version_8.3.37.java:0)
at com.android.tools.r8.Q.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:5)
at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:244)
at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:90)
at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:909)
at com.android.tools.r8.internal.po.b(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:99)
at com.android.tools.r8.D8.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:1041)
at com.android.tools.r8.D8.b(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:514)
at com.android.tools.r8.D8.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:1076)
at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:1256)
... 1 more
Caused by: com.android.tools.r8.internal.h: Type b4a.example.b4xbitset is defined multiple times: C:\Android-SDK\tools\..\extras\b4a_local\unpacked-webgl-63871162194874\dex_v1\webgl.zip:classes.dex, C:\Users\Massimo\Documents\PROGETTI_B4A\ESEMPI MIE LIBRERIE\WebGL_Demos\WebGL_Library_Demo\B4A\Objects\dexed\b4a\example\b4xbitset.dex
at com.android.tools.r8.internal.X30.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:346)
at com.android.tools.r8.internal.pX.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:232)
at com.android.tools.r8.internal.pX.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:91)
at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2056)
at com.android.tools.r8.internal.pX.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:32)
at com.android.tools.r8.graph.q4$a.d(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:6)
at com.android.tools.r8.dex.c.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:264)
at com.android.tools.r8.dex.c.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:222)
at com.android.tools.r8.dex.c.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:219)
at com.android.tools.r8.D8.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:809)
at com.android.tools.r8.D8.d(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:212)
at com.android.tools.r8.D8.c(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:163)
at com.android.tools.r8.internal.po.a(R8_8.3.37_d0b8d9dfe8720e37c27d2233931d9d72dbd696ffd92111cc9b36e58b4baad1cc:906)
... 6 more
Please, someone know the reason for this error ?
Many Thanks
Max
Last edited: