Karan Karan - 1 year ago 136
Android Question

Adding a external jar reference in Android.mk

I want to add a external third party jar file in the inbuilt android app.

I've added the LOCAL_CLASSPATH variable in Android.mk due to which the compilation goes fine. But during runtime, it is not able to find the class definiation which is in the JAR.

Which is the variable I need to set to add the third party JARs in the .dex/.apk ?


Answer Source

Here is what I used to solve the problem :


This should be added in Android.mk after include $(BUILD_PACKAGE)

You also need to specify the library name in LOCAL_STATIC_JAVA_LIBRARIES for compilation.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download