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.

Skrekkur3Author
Inspiring
May 7, 2013

Finally I got it build. There were some duplicate symbol warnings in the assetlib.fla

Now I am trying to get the main project to build and run correctly.

UPDATE:

Is there any way to see the details of how runtime shared libraries work especially on IOS?

When I got to the actual project flash seems to crash excactly when I try to load the first file that uses shared assets from assetlib.swf. Although I managed to get it to work in the test project

Main difference is that all the assets are in a subfolder called assets on the device.

So If a file uses a shared library with a basic path like assetlib.swf Will it try to load that file from the file location or from the base app location?


Did only work partially If I try compiling it with ant using flex it crashes & if I try to export release build from FB 4.7 it just says

"some classes used in the application could not be resolved for packaging"

Update,

I have officially given up on this method due to its unstability and not working after few days of trying.

Will go with Embedding both swc and changing linkage names on all retina graphics. Its a shame since it would have been very nice to have it dynamically load the swf, like works on Web player.

However if Adobe has any interest in improving this (that is dynamic swf load on iOS)  I would be willing to provide additional support.