First, I've been looking throught this topics
I got a similar problem. But not exactly the same. And the solution didn't worked for me :(.
First of all, I don't have any visible error.
-I can easily talk between java and action script.
-The gateway is set without problems.
My problem comes when, from my java-side-part of the extension, I try to call a 3rd party library. This library is (and I think this is where I do something wrong) linked to my project as an external lib, in .jar format.
So when I make a call to 3rd party library, it just doesn't print anything. Neither on the adobe part or on the java part. The logs that are before my call are printed but not the ones after.
I tried different solutions that are:
-Taking all compiled class files of my external lib and add it inside the main native extension jar [link1]
same result (no errors)
-including the 3rd party jar inside the ANE by adding a dependence file that require the .jar [link2]
with this method i got this error that I don't get
> aapt tool failed:ERROR: input directory '--auto-add-overlay' does not exist
My third party library also include's itself some external .jars so do I need to include every jars inside the same packaged jar?
I can see that a lot of people are dealing with issues like that so my question would be:
What is the best way to include 3rd party library inside android AIR Native Extension ?.
For information, here is what I do to create the ANE
>adt -package -target ane AirInfinitGameANE\AirInfinitGame.ane AirInfinitGameASLib\src\extension.xml -swc AirInfinitGameANE\AirInfinitGameASLib.swc -platform Android-ARM -C AirInfinitGameLib .
- AirInfinitGameASLib: just the folder with the actionScript part and the config xml file
- AirInfinitGameANE: folder in the one that will be the native extension
- AirInfinitGameLib: the eclipse java project. I need to put in that folder the airInfinitgamelib.jar(extension jar) and the library.swf (from the swc file) in order to beeing able to compile the ANE.
Here it is ! Thanks a lot for thoses who'll read me.
I have the same problem, and no one figures it out?
I had the same problem recently and fixed it as follows;
- Extract the 3rd party jar file and copy the class folder (usually named "com" in the root of the jar) to my project.
- Under Project Properties -> Java Build Path -> Libraries click "Add class folder" and add the "com" folder you just extracted from your .jar.
Hope this helps
how do you extract a .jar file?