developer1414 New Member Feb 20, 2025 #1 Hi I am creating a B4A library from an Android Studio project using the Simple Library Compiler following the tutorial The project consists in a single java class (called MyClass.java) that use methods from an external .jar lib (called ExternalLib.jar). As the tutorial says to create the library (that I will call MyLib.jar) I put MyClass.java in the src folder and ExternalLib.jar in the libs folder. After compiling the lib and referencing it in my new project I can call the methods of MyClass.java but the ones that use methods of ExternalLib.jar produce java.lang.ClassNotFoundException. Trying to investigate I opened MyLib.jar with WinRAR and I only found MyClass.class so I have no idea where ExternalLib.jar went
Hi I am creating a B4A library from an Android Studio project using the Simple Library Compiler following the tutorial The project consists in a single java class (called MyClass.java) that use methods from an external .jar lib (called ExternalLib.jar). As the tutorial says to create the library (that I will call MyLib.jar) I put MyClass.java in the src folder and ExternalLib.jar in the libs folder. After compiling the lib and referencing it in my new project I can call the methods of MyClass.java but the ones that use methods of ExternalLib.jar produce java.lang.ClassNotFoundException. Trying to investigate I opened MyLib.jar with WinRAR and I only found MyClass.class so I have no idea where ExternalLib.jar went
agraham Expert Licensed User Longtime User Feb 20, 2025 #2 Put ExternalLib.jar in your additional libraries folder together withMyLib.jar and MyLib.xml. Add #AdditionalJar: ExternalLib to the Project Attributes region in your Main module.
Put ExternalLib.jar in your additional libraries folder together withMyLib.jar and MyLib.xml. Add #AdditionalJar: ExternalLib to the Project Attributes region in your Main module.