I want to create native libraries that will eventually be used in the same app.
However, the following problem arises when native library A loads b4xlib B and native library C also loads b4xlib B. Then, in the app that uses only the two native libraries A and C, I get an error message during compilation stating that the contents of b4xlib B are defined twice. As a result, the app cannot be compiled.
This happens more quickly than you might think, for example, when libraries A and C simply want to read and write XML using map2xml or xml2map.
XUI Views.b4xlib is particularly challenging. It is used by many other components, such as PreoptimizedCLV.b4xlib, SimpleMediaManager.b4xlib, B4XBitmapEffects.b4xlib, and many others. If these B4xlibs are located in different native libraries, they cannot be used together in the same app.
Even in a clearly structured architecture, problems arise when the view layer uses SimpleMediaManager.b4xlib (which depends on iHttpUtils2.b4xlib) and the actual network communication via HTTP takes place in a lower layer. In that case, these two layers cannot be compiled as native libraries because both would import iHttpUtils2.b4xlib and therefore they cannot be used together in the same app.
Are there strategies for dealing with such situations?
(Since I don't have any ideas for a solution, I simply think that internal libraries should no longer be deployed as b4xlibs in the future, but only as native libraries. That would alleviate the problem somewhat.)
Currently, it is a major challenge to structure the architecture of a large app into horizontal layers or vertical components using native libraries, because in both cases there can be issues with B4xlibs being imported multiple times.
If you would like to know why I need native libraries on local builder and don’t simply work with b4xlibs, please read here:
www.b4x.com
www.b4x.com
However, the following problem arises when native library A loads b4xlib B and native library C also loads b4xlib B. Then, in the app that uses only the two native libraries A and C, I get an error message during compilation stating that the contents of b4xlib B are defined twice. As a result, the app cannot be compiled.
This happens more quickly than you might think, for example, when libraries A and C simply want to read and write XML using map2xml or xml2map.
XUI Views.b4xlib is particularly challenging. It is used by many other components, such as PreoptimizedCLV.b4xlib, SimpleMediaManager.b4xlib, B4XBitmapEffects.b4xlib, and many others. If these B4xlibs are located in different native libraries, they cannot be used together in the same app.
Even in a clearly structured architecture, problems arise when the view layer uses SimpleMediaManager.b4xlib (which depends on iHttpUtils2.b4xlib) and the actual network communication via HTTP takes place in a lower layer. In that case, these two layers cannot be compiled as native libraries because both would import iHttpUtils2.b4xlib and therefore they cannot be used together in the same app.
Are there strategies for dealing with such situations?
(Since I don't have any ideas for a solution, I simply think that internal libraries should no longer be deployed as b4xlibs in the future, but only as native libraries. That would alleviate the problem somewhat.)
Currently, it is a major challenge to structure the architecture of a large app into horizontal layers or vertical components using native libraries, because in both cases there can be issues with B4xlibs being imported multiple times.
If you would like to know why I need native libraries on local builder and don’t simply work with b4xlibs, please read here:
Hosted Builder reports Error: ** BUILD INTERRUPTED ** on a large B4i project
Hi, I have a large B4i project that is built with the hosted builder. The build is interrupted near the end, but I cannot find a real compiler or linker error in the log. The final error is only: Error: ** BUILD INTERRUPTED ** The generated Xcode build is very large. The log contains 508...
Hosted B4i Builder extremely slow after confirming install on device
Hi all, I’d like to ask whether anyone else is currently experiencing very slow behavior with the Hosted B4i Builder, specifically after the install confirmation dialog. In my case, the build itself completes normally and without unusual delays. After that, I get the dialog asking whether I...
Last edited: