Copy link to clipboard
Copied
I've been developing an AIR application for Android and iOS. During development, I've run the application (in debug mode) in the desktop simulator as well as on an iPhone 4 and a Nook Tablet.
However, I recently tried to "Export Release Build" for iOS and hit the following error: (I've stripped out the package and class information in the error message below)
!ENTRY com.adobe.flexbuilder.project 4 43 2012-04-06 13:09:15.516
!MESSAGE Error occurred while packaging the application:
Exception in thread "main" java.lang.Error: Unable to find named traits: valid.package.path.here::ValidClassName
at adobe.abc.Domain.resolveTypeName(Domain.java:231)
at adobe.abc.Domain.resolveTypeName(Domain.java:148)
at adobe.abc.GlobalOptimizer.sccp_eval(GlobalOptimizer.java:6665)
at adobe.abc.GlobalOptimizer.sccp_analyze(GlobalOptimizer.java:5909)
at adobe.abc.GlobalOptimizer.sccp(GlobalOptimizer.java:4628)
at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:3514)
at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:2215)
at adobe.abc.LLVMEmitter.optimizeABCs(LLVMEmitter.java:526)
at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:336)
at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler.java:472)
at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:82)
Compilation failed while executing : ADT
!STACK 0
java.lang.Exception
at com.adobe.flexbuilder.project.internal.FlexProjectCore.createErrorStatus(FlexProjectCore.java:1019)
at com.adobe.flexbuilder.util.logging.GlobalLogImpl.log(GlobalLogImpl.java:66)
at com.adobe.flexbuilder.util.logging.GlobalLog.log(GlobalLog.java:52)
at com.adobe.flexbuilder.exportimport.releaseversion.ui.ExportReleaseVersionWizard.doPackage(ExportReleaseVersionWizard.java:283)
at com.adobe.flexbuilder.exportimport.releaseversion.ui.ExportReleaseVersionWizard.performFinish(ExportReleaseVersionWizard.java:152)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersionAction$1.run(ExportReleaseVersionAction.java:97)
at com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersionAction.run(ExportReleaseVersionAction.java:103)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.adobe.flexbuilder.standalone.FlashBuilderApplication.start(FlashBuilderApplication.java:108)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
The class the error message is referring to is defined with a SWC that my project links to. However, I've even tried to define a class with that same name (and location) within my project and it still fails to find it.
Why am I able to Project->Clean and run this project within the desktop AIR player (or on the device in debug mode) but unable to export it as a release build?
I have found a couple of threads mentioning a similar error but none of them have been marked as resolved.
Copy link to clipboard
Copied
It's probably also worth pointing out that I am able to export a release build for Android. Why can I export for Android but not iOS?
More (potentially) relevant information:
Copy link to clipboard
Copied
Was about complete an export by commenting out all code in my application that referenced a specific class in one of our internally-developed ActionScript libraries. The class in question is nothing special. There's nothing in it that jumps out as potentially problematic.
Is this some llvm cross-compiling issue? What would make the exporter freak out like this?
Copy link to clipboard
Copied
Bump. This issue has come up again. Different class, but otherwise all of the information remains the same. This time I definitely can't comment-out the code in question.
Anyone? Anything?
Copy link to clipboard
Copied
At this point I feel I am talking to myself, but I will share my work-around in case it helps another who may stumble across this post.
In my particular case, both my main AIR application and my ANE wrapper library were referencing the same external Flex library (same revision). Both projects had the library linkage set to merge. Changing the linkage to "External" on one of the 2 libraries (it doesn't seem to matter which) and leaving the other as "Merged into code" enabled the export to complete without the bizarre "Unable to find named traits" error.
Copy link to clipboard
Copied
Unfortunately this seems to have been a false lead. It did cause the error to go away for some time but it has returned for reasons unknown. Maybe this fix just tickled something else and caused it to go away for a while.
Copy link to clipboard
Copied
You may be encouraged? enraged? disappointed? that this bug is plaguing me as well. In just about the same way you describe. Well over 2 years since you first reported it.
It seems like the linker is stripping out classes before the AOT compiler gets ahold of them. I can force the linker to keep each class by mentioning it in the main class of my application, but each one that gets mentioned just makes way for the next class to fail to link. I must say that the whole experience of getting a non-trivial Adobe AIR app actually working properly on iOS has been spectacularly fail.