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

前端 未结 2 1959
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-30 10:33

With all the new hype surrounding native extension support in AIR 3, I haven\'t found a single thing that confirms or denies it is possible to include and use an external JA

2条回答
  •  一生所求
    2020-11-30 10:56

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

提交回复
热议问题