Unable to find named traits: com.company.artAsset iOS Retina/Standard
When I try to package my application as ad-hoc or app-store on ios I get this from the compiler:
[java] Exception in thread "main" java.lang.Error: Unable to find named traits: com.company::ArtAssetClip
[java] at adobe.abc.Domain.resolveTypeName(Domain.java:232)
[java] at adobe.abc.Domain.resolveTypeName(Domain.java:149)
[java] at adobe.abc.GlobalOptimizer.sccp_eval(GlobalOptimizer.java:6775)
[java] at adobe.abc.GlobalOptimizer.sccp_analyze(GlobalOptimizer.java:6019)
[java] at adobe.abc.GlobalOptimizer.sccp(GlobalOptimizer.java:4733)
[java] at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:3615)
[java] at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:2309)
[java] at adobe.abc.LLVMEmitter.optimizeABCs(LLVMEmitter.java:532)
[java] at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:341)
[java] at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler.java:611)
[java] at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:104)
[java] Compilation failed while executing : ADT
I have searched the forums and many people have had this error but the solution suggested is usually to statically link assets or code as SWC.
In my case this is not an option and perhaps I have reached a dead end with this method.
What I am trying to achieve is to support both retina and normal iPads. We have all our HUD assets in flash and we have made two versions of all the assets, retina and nonretina.
The idea was that you could have the code like this
var popupClip:FancyPopup = new FancyPopup();
Then there is FancyPopup.swf and FancyPopup-2x.swf that are loaded depending on if you are on a retina device or not.
This works on web and if the application is packaged with interpeter. But I assumed this method could work after swf loading was allowed on IOS
here is link to a project set up similarly to our main project, and can reproduce this problem.
https://dl.dropboxusercontent.com/u/154782/assetMultiProjectTestfield.zip
My question is, is this method possible? can I disable the optimization of particular Classes. What can I do?
Because alterntatively we will have to go through all the assets and have the retina graphic exported with different linkage names and pollute the code everywhere with :
if (retina)
_clip = FancyPopupClip2x();
else
_clip = FancyPopupClip();
Because of the size of our code base and assets I would really like to avoid that but It would be good to know for certain if dynamic loading of SWF would not work in this case.
Currently i am using Flex 4.6 with AIR 3.7 to build