Android library projects are library projects that include resources. It is not enough to reference the compiled code (jar) as the resources are required. Copying the resources to the B4A project will not work as well as the library expects its own R.java file.
Up until v3.20 it was more or less not possible to reference such projects from Basic4android.
Now, with the new #AdditionalRes module attribute it is possible to wrap these projects.
Building a wrapper
The steps required are:
- Add the library project to Eclipse (New - Other - Android project from existing code).
Unlike other libraries, you need to have ADT installed correctly.
- Let Eclipse build the library.
- It will generate a jar file with the compiled library. The jar file will be located under the bin folder. You will need to distribute this jar together with the wrapper.
- Now you should create the wrapper library.
- You should use @DependsOn to add a reference to the compiled jar and you will also need to add a reference to the jar in Eclipse (or put the jar in the libs project if you are using SLC).
For example:
The Android library project:
The wrapper:
Using the wrapper
- Download the library project and save it somewhere.
- Copy the wrapper and the compiled jar file to the additional libraries folder.
- Add the following attribute to the project:
You, the wrapper developer, should provide the package name. You can see it in the library's manifest file.
Up until v3.20 it was more or less not possible to reference such projects from Basic4android.
Now, with the new #AdditionalRes module attribute it is possible to wrap these projects.
Building a wrapper
The steps required are:
- Add the library project to Eclipse (New - Other - Android project from existing code).
Unlike other libraries, you need to have ADT installed correctly.
- Let Eclipse build the library.
- It will generate a jar file with the compiled library. The jar file will be located under the bin folder. You will need to distribute this jar together with the wrapper.
- Now you should create the wrapper library.
- You should use @DependsOn to add a reference to the compiled jar and you will also need to add a reference to the jar in Eclipse (or put the jar in the libs project if you are using SLC).
For example:
The Android library project:

The wrapper:

Using the wrapper
- Download the library project and save it somewhere.
- Copy the wrapper and the compiled jar file to the additional libraries folder.
- Add the following attribute to the project:
B4X:
#AdditionalRes: <path to the project res folder>, <library project package name>
You, the wrapper developer, should provide the package name. You can see it in the library's manifest file.