2

I'm in an odd situation at the moment where we have an established mobile code base that we are trying to integrate some native extensions into. The code base is made up of several "Flex Library Projects" that are used to compile the main application through Flash Builder 4.6.

We need to use the native extension functionality within one of the included libraries but we keep getting errors of missing classes during the final release build compilation.

Error occurred while packaging the application:
Exception in thread "main" java.lang.Error: Unable to find named traits: ***

The missing class is a class contained in the Actionscript side of the extension.

We've tried several methods of referencing the extensions:

  • adding like swc's in the library build path
  • renaming the ane's to swc's and including in build paths
  • tried linking as external resources

Most of these seem to work, and we can even get a debug build working, but once we package for the iOS release we get the above error.

This is not an iOS Framework issue as the class is an Actionscript class contained in the ANE.

Michael
  • 3,776
  • 1
  • 16
  • 27
  • Working with ANEs is an incredibly frustrating process. – micapam Aug 02 '12 at 06:17
  • (I hit 'Enter' too soon :) I've seen that error too... I think you have to refer to the SWC using -compiler.include-libraries rather than -library-path. At least, that's how I do it (although I'm using Ant rather than an IDE). The SWC should be the proper SWC, not a renamed ANE. – micapam Aug 02 '12 at 06:25
  • Yeah, I'm using the include libraries compiler option but still it seems to be missing this class.. Stumps me as to why the debug build works but not the release, I'm not changing the ANE between builds... – Michael Aug 23 '12 at 00:46
  • Michael, I've since found that I got similar problems when a class in my application implemented an interface in the ANE (or extended a class, I forget). No idea if it's a similar problem with your code but I thought I would mention it. – micapam Jan 24 '13 at 04:01
  • Did you or How did you fix this problem on release build about ane files? – nadir.shpz Jan 03 '13 at 09:45
  • Still having the same problem. The only way we've found around it is to rename the library classes package names and compile each extension with these classes included. Painful, and impossible to maintain, but it works. – Michael Jan 05 '13 at 02:04
  • Possible duplicate of [IOS Framework into ANE](http://stackoverflow.com/questions/27528292/ios-framework-into-ane) – Paul Sweatte Nov 28 '15 at 00:15

0 Answers0