I'm currently trying to program an Android application. Yet I'm stuck because I'm trying in incorporate a Java library I've written myself. When I run a test code from a plain Eclipse (No Android) it works perfectly, but when I try to add it to my Android code it won't.
In my library project:
This project is a project that has a server + client connection using Java Sockets, I have written an API for the Server and Client to communicate, in Windows it works perfectly, yet it won't load my class: ClientAPI in Android :/
I have exported my code as a JAR File. I checked the: Export generated class files & resources.
This project also incorporates an external library from LastFM api.
In my Android project:
I'm using ADT v22.0.1-685705
Using the Android 4.2.2 reference library
I copied my library to the libs folder, I loaded the library in my build path and added it to the top my "Order and Export" list.
I have tried several permutations of including the library but without luck.
I tried:
- Add my library to 'libs' folder + build path
- Add my library + the LastFM library to 'libs' folder + build path
- Export my library as a runnable jar + the two above steps with that jar
- Copy the project to the same workspace and include the project instead of the library
- Above step but add the LastFM library seperatly
None of the above tries worked :/ I hope the java socket doesn't make it incompatible because it is essential to my program.