Is there any way to export a desktop AIR package when desktop is not supported by an ANE?

I have a third party ANE that I need to use. The ANE has a target for Android, but when I add it in Build Path->Native Extensions an error shows up "This ANE does not support Desktop(Mac) platform". Now, my app is targeting android, but to make it easy for others in my company to play builds without having a device, I've been using the "Export Release Build->Signed AIR package for installation on desktop" option. The problem is, since I've added the ANE, I'm no longer able to hit the "finish" button because it's greyed out due to the error (even though the checkbox to include the ANE is unchecked in the export settings. The only way I've found to work around this is to remove the ANE temporarily and comment out references to it to build the desktop package, which is not optimal. Any other suggestions?
Thanks!

Rather than commenting it out, you could define a compiler parmeter:
[code]
  -define=CONFIG::includeAndroidANE,true
[/code]
Then, in your code, wrap any references to the problem code in the config statement
[code]
CONFIG::includeAndroidANE
import the.problem.package.ProblemExtensionClass;
[/code]
And:
[code]
CONFIG::includeAndroidANE
   if(ProblemExtensionClass.isSupported()) {
        var v:ProblemExtensionClass = new ProblemExtensionClass();
         v.init();
         v.doSomethingThatIsntSupportedOnAMac();
[/code]
Then, when you compile for Mac, you just need to set CONFIG::includeAndroidANE,false;
This is what OSMF does to support different versions of the player, and also what SWIZ do to support different versions of Flex.
All good.
G

Similar Messages

Maybe you are looking for

  • AC Adapter for Toshiba Satellite M40X-129

    Hello guys, hope this is the correct forum to post my question in: I have a Toshiba Satellite M40X-129 (Model No: PSM4XE-01600CGR). My AC-Adapter is buggered so I need to get a new one. Bought the machine in Germany, am now in Tasmania / Australia. B

  • Hindi file in PDF is not opening in 10.1.3

    Hindi file received in PDF is not being opened in readable format. Having Reader 10.1.3 Window 7 Pls help

  • Making a call via iPhone to mobiles and landlines ...

    Hi I'll be traveling overseas this year and I would like to stay in touch back home here in the U.S.A. I have skype credit and I would be using the keypad on the app to call landlines and mobiles in the U.S.A while either on wifi or mifi, would this

  • 1.2 firmware, where are you Apple?

    Apple I am sure that you are more that aware of the problems of firmeware rev. 1.2. Are these problems that those of us are having fixable? Or is this a hardware problem and you are trying to wait until the one year warranty is gone to inform us? To

  • Locality...

    Hi, I was wondering if Verizon has a wireless network in Canada. I'm currently with another wireless provider and am looking to switch and I've heard that Verizon is pretty good. Can anyone answer this for me?