B4J Question MLWiFi400 compile problem

davemorris

Active Member
Licensed User
Longtime User
Hi, Guy
I am presently converting some code from B4A to B4J - the original B4A code uses MLWifi400 and so I simply copied the the following files to the B4J AdditionalLibraries Folder.

MLwifi400.aar
MLwifi400.jar
MLwifi400.xml

The MLwifi4000 then appears under the Libraries Manager Tab (which was when ticked to include it in the project)
MLwifi4000 entry in the Libraries Manager Tab is version = 4.41 path = Additional with the Platform = B4J , so it appeared OK.

Unfortunately, when I tried to compile it failed with the following problem
B4J Version: 10.00
Parsing code. (0.22s)
Java Version: 11
Building folders structure. (0.46s)
Running custom action. (0.05s)
Compiling code. (0.75s)
Compiling layouts code. (0.01s)
Organizing libraries. (0.00s)
Compiling generated Java code. Error
Cannot find: C:\Program Files\Anywhere Software\B4J\libraries\mlwifi400.aar.jar

I don't understand what why it is looking in internal library folder when I have setup the IDE's Additional Library path correctly.
I did try copying the above files into the internal library but that did not work.

Would greatly appreciate any comments.

Regards
Dave
 

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
If it uses an aar file it means it's not compatible with b4j. It doesn't matter if it appear in the library tab.
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
I don't understand what why it is looking in internal library folder when I have setup the IDE's Additional Library path correctly.
I did try copying the above files into the internal library but that did not work.

Would greatly appreciate any comments.
The core of the problem is that an Android library uses Android OS class routines. In this case, the library wants to import several android.net classes. These are only available under the Android OS and do not work in the Windows environment. Only a pure Java solution could possibly work under B4A and B4J. Usually the AAR file is often the result of an Android Studio project and where Kotlin and not Java is the common standard. Without knowing your exact purpose, but considering the fact that access to a WiFi adapter takes place very deep in the OS, you will have to start from scratch with a Java SDK for your WiFi adapter. It will be very difficult to make it a success.
 
Upvote 0
Top