AIR 3 Native Extensions for Android – Can I/How to include 3rd party libraries?

You have to combine all your jars into one. Something like http://code.google.com/p/jarjar/ or your own Ant script will help.

Edited to add example:
Suppose your main extension jar file is extension.jar and you are using code in external.jar. Then you can put the classes from external.jar into extension.jar using the Java jar tool:

jar -xf external.jar

This will extract the .class files into package folders. If the top-level package is “com”, then you can add those to extension.jar with:

jar -uf extension.jar com

(Repeat the second command for each top-level package in the external jar.)

Leave a Comment