0

I receive this error durring the publishing of my game.

    Error creating files. dx tool failed : 
UNEXPECTED TOP-LEVEL EXCEPTON: java.lang.illegalArgumentException:
already added : android/support/v7/appcomapt/R$anim; 
at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java.123)....

(is long error)

I have included an ane for ads (AIRPUSH)

When I run that ane in new project it's working perfectlly.

What can be the problem?

enter image description here

tziuka
  • 545
  • 1
  • 6
  • 23
  • __what__ error? "I received **this** error..." and then no explanation of the error whatsoever. Are we supposed to guess the error? –  Mar 27 '15 at 12:40
  • I post the image.. It's not appear to you? – tziuka Mar 27 '15 at 12:42
  • Nope, even with Adblock and Disconnect turned off, neither on Chrome, IE or FF. –  Mar 27 '15 at 12:46
  • so strange... I can give you teamviewer if you want to see that I posted image with the eror, However I update the question and I wrote manually – tziuka Mar 27 '15 at 12:48
  • No, not necessary. Do you use any other ANE? If so, the problem is most likely that the other ANE also imports the appcompat library of Android. you need to use the option `-hideAneLibSymbols yes`. Either, somewhere in your IDE, or if you're packaging through a CLI by simply adding it in the compile step (iirc). –  Mar 27 '15 at 12:55
  • At first I used, but I was thinking that it may be in conflict so I clear all the other anes, also I clear from xml... Where to hide Anes? I never used that where I have to use that instruction? – tziuka Mar 27 '15 at 13:04
  • This depends on the IDE you are using. I don't know where you could do it in Flash Pro CS6 or CC, but in FDT it is available in the AIR settings of the AIR project. And like I said, if you're using the command line to compile and package manually, the option should go into your compiling step, if i remember correctly. –  Mar 27 '15 at 13:08
  • I don't do from command line. I use flash CC and it have a button for publish.... – tziuka Mar 27 '15 at 13:10

1 Answers1

1

I've faced this one before.

The exception tells you that the android-support-v7 library's R class (See R* mechanism with ANEs) is being packaged twice. Which explains why it works fine with a new ANE project.

Please check if you have them included inside your ANE's platform.xml as a <packagedResource> (If so remove it from here)

OR

Check if it is being added from inside one of your other ANEs.

SNce
  • 2,453
  • 1
  • 16
  • 14