1

I'm facing the issue with the com.distriq.Core ANE, it's conflicting with my other ANEs (I know it when I remove it from app packaging, but after include this ANE, Flash Builder was failed to build).

Here is the error message:

Error occurred while packaging the application:

dx tool failed:
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcom/adobe/air/ActivityResultCallback;
    at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
    at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
    at com.android.dx.command.dexer.Main.processClass(Main.java:737)
    at com.android.dx.command.dexer.Main.processFileBytes(Main.java:678)
    at com.android.dx.command.dexer.Main.access$300(Main.java:83)
    at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:607)
    at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
    at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
    at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
    at com.android.dx.command.dexer.Main.processOne(Main.java:637)
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:511)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:281)
    at com.android.dx.command.dexer.Main.run(Main.java:247)
    at com.android.dx.command.dexer.Main.main(Main.java:215)
    at com.android.dx.command.Main.main(Main.java:106)
1 error; aborting

So I'm asking for an advise, what should I do now?

Much appreciated !

Goon Nguyen
  • 1,462
  • 11
  • 26
  • does distriqt provides source codes of this ANE? – payam_sbr Dec 12 '16 at 06:28
  • no, @payamsbr. They only provide the ANEs. – Goon Nguyen Dec 12 '16 at 07:13
  • you have to find another problematic ANE (which cant be used beside `com.distriqt.core`) then if that is open source, you may fix issue, other wise no way – payam_sbr Dec 12 '16 at 08:12
  • @payamsbr damn.. I've researched on google, someone talked about unzip the ANE, remove the duplicated JAR file and repackage them.. sounds simple.. but there is no detailed instruction, so I don't really know where to start :( – Goon Nguyen Dec 12 '16 at 09:30
  • in past i did some thing like this too, do you have **Winrar** or **7-zip**? – payam_sbr Dec 12 '16 at 09:43
  • @payamsbr of course I do, I unziped the ANE already, deleted the JAR file, then.. what next? :) – Goon Nguyen Dec 12 '16 at 09:48
  • 1
    don't need for unzipping, only open up Winrar, then drag ane to its window, modify what you want, then ane will be updated automatically – payam_sbr Dec 12 '16 at 09:52
  • Note, may be it will be important to reordering Modified Ane to be added to AIR(project) after other ANE's that contains removed JAR – payam_sbr Dec 12 '16 at 09:53
  • I've just tried that, but still doesn't work. When I compile, FB through this error "com.distriqt.Core.ane is not a valid native extension file." – Goon Nguyen Dec 12 '16 at 12:08
  • 1
    maybe it should be packed via AIR SDK, i'm not sure, read [**this article**](http://www.adobe.com/devnet/air/articles/building-ane-ios-android-pt5.html) and test your chance with generating a valid ANE with lack of problematic JAR. – payam_sbr Dec 12 '16 at 12:59
  • Thanks for your patience @payamsbr, I will give it a shot :) – Goon Nguyen Dec 12 '16 at 13:15
  • Good-luck :) please post the right answer when you got that, its a good question and would be helpful for many persons. – payam_sbr Dec 12 '16 at 13:24
  • 1
    Unluckily still no success @payamsbr, I'm reaching the support team of Distriqt, will update the answer later – Goon Nguyen Dec 13 '16 at 05:37

2 Answers2

3

The support team from Distriqt already provided me an new ANE called "com.distriq.Core.noair.com" with the conflicted JAR file is removed.

https://github.com/distriqt/ANE-Core/tree/master/lib

In case someone want to know which ANE it was conflicting with, it's "overideAir.ane" from MyFlashLab team.

Big thumbs up for the amazing support from Distriqt!

Cheers!

Goon Nguyen
  • 1,462
  • 11
  • 26
0

The conflict will be with an ANE from another provider, if you contact our support we will work with you to remove the classes that are conflicting with your other ANEs.

Michael
  • 3,776
  • 1
  • 16
  • 27