• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

External library inside Air native extension for android

New Here ,
Aug 05, 2014 Aug 05, 2014

Copy link to clipboard

Copied

Hello everyone,

First, I've been looking throught this topics

- http://stackoverflow.com/questions/7732742/air-3-native-extensions-for-android-can-i-how-to-include-...

- http://stackoverflow.com/questions/24626380/how-to-include-additional-jar-in-android-native-extensio...

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.

TOPICS
Development

Views

2.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 29, 2014 Nov 29, 2014

Copy link to clipboard

Copied

I have the same problem, and no one figures it out?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 13, 2015 Mar 13, 2015

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 25, 2015 Aug 25, 2015

Copy link to clipboard

Copied

LATEST

how do you extract a .jar file?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines