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

久未见 提交于 2019-11-27 04:52:30

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.)

You could also combine the library jars manually by turning them into zip-files (just rename them to .zip) and copy the classes from the 3rd party library into the main one and rename that one back to .jar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!