How to add third-party jar files to jar file for Android app?

I have an Adobe AIR application for Android. Use for this AIR 3.0 and Flash Builder 4.6. I need to make MyANEFile.ane - which should include 2 external .jar files: Flurry.jar + Tapjoy.jar. But when I made the .ane file - it does not work. How can I add these 2 jar files to my main application jar file to make the .ane file right? Thanks.

This shows me such errors in dalwick:

* 01-31 21: 37: 37.046: I / dalvikvm (12983): Could not find com.amobee.agency.tracking.AmobeeReceiver.amobeeTracking method, link to com.mycompany.extensions.AmobeeInitAmobeeTrackingFunction.call

01-31 21: 37: 37.046: W / dalvikvm (12983): VFY: cannot solve static method 317: Lcom / amobee / agency / tracking / AmobeeReceiver; .amobeeTracking (Ljava / lang / String; Landroid / content / context; Ljava / languages ​​/ String;) V *

+1
source share
3 answers

Suppose your main jar extension file is extension.jar and you use the code in the external.jar file. 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 to the folder folders. If the top-level package is "com", you can add it to extension.jar with:

jar -uf extension.jar com

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

+2
source

If you use Eclipse for development, right-click on the project and go to:

Properties β†’ Java Build Path β†’ Libraries β†’ Add External JARs

+2
source

I had a problem creating Android ANE for AdMob, and this is what worked for me.

Do as Flynn suggested, and add the jar in the Java build path:

Eclipse Java Build Path showing GoogleAdMobsAdsSdk jar in the build path

Then the only way I could use the AdMobs banner in ANE was to export my own Android jar with ANE with Export ... β†’ Java β†’ JAR File and have both β€œExport all output folders for verified projects” and β€œExport source Java files and resources ":

Eclipse JAR Export with "Export all output folders for checked projects" and "Export Java source files and resources" selected

+1
source

Source: https://habr.com/ru/post/973782/


All Articles