Skip to main content
Inspiring
April 30, 2013
Question

Unable to find named traits: com.company.artAsset iOS Retina/Standard

  • April 30, 2013
  • 1 reply
  • 1530 views

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

This topic has been closed for replies.

1 reply

Adobe Employee
April 30, 2013
Skrekkur3Author
Inspiring
April 30, 2013

I've been trying that out today, but not gotten it to build yet.

It should be noted that I do not need external loading, that is I intend to have the swfs included in the IPA.

After adding the textfile & swfs to the build I still get the same error.

Update: there was something wrong with the asset swf I was using. Seems to build now, will report back if this method works or not.

Adobe Employee
May 1, 2013

Oh, OK. If you don't intend to load external swfs, you don't need this feature.

You just need to provide the swfs in the packaging command line.

Would it be possible for you to share your swf files, assests and packaging command so that we may try reproduce this locally?

Thanks,

Daman