Adobe AIR | Objects from Animate marked as "unresolved"

Answered

I have an Adobe AIR project (Windows 10) consisting of AS3 classes, and graphic assets compiled from Animate XFL files as SWC libraries, then added to the project via the “Dependencies” tab.

In the code, all objects from these SWCs appear in red, and are marked as “unresolved type". Subsequently, all properties of their instances are also marked as “unresolved variable”.

I would expect the project to be unable to run, but actually, it runs fine, which puzzles me…

(I have another project with the same kind of setup, and graphic assets from Animate are perfectly taken into account: recognized according to their type, with full auto-completion of their properties, etc.)

3 developers (including me) have the project set up in IntelliJ (2 Windows, 1 MacOS), and the issue is the same for the 3 of us.

So I wonder what might be wrong with this project, that makes the assets look like they're not recognized in the code.

0
7 comments

Denis,

Sorry for the delay.

Probably IDE-level file limit somehow affects resolution.

Please try to set `idea.max.content.load.filesize` in Help | Edit Custom Properties… to some value (in Kb) more then your SWC file size, e.g. “idea.max.content.load.filesize=200000” and restart IDE. Will it help?

1

Hello Denis,

Do you use any build tool in your project (e.g. Maven)? Is it possible to attach screenshots from “Project Structure | Modules - Dependencies” showing added SWC libraries?

Will you face the same issue if you add SWC library used in broken project to the working project?

0

Hello Yaroslav, Thank you for your help.

There's no build tool in the project that I'm aware of.

Here is a screenshot of the dependencies:

I've also noticed this warning

I think “libs” must relate to the “libs” directory where all SWC files can be found?

I went a bit further, to test more hypotheses. Actually, the problem seems to lie inside just 2 SWC files among the 20+ of the project.

So I thought some specific clip(s) from the XFL library  might be to blame. Indeed, if I remove clips gradually and re-compile, I reach a point where the SWC gets “clean”: the objects are no longer marked as “unresolved” in IntelliJ. So I thought I'd be able to find the very clip(s) to blame, but actually no: e.g. I have identified 3 pictures in the library. If I remove any of them, the problem is solved, as if not one specific file was to blame, but the 3 of them together. Also, removing another library folder (totally unrelated to the 3 pictures mentioned above, so they remain in the project) fixes the issue just as well.

Actually, I note that these 2 SWC files are the largest (by file size) of the project: 35+MB & 21+MB. So finally, I think the SWC might become valid for IntelliJ as soon as the file size passes below a certain threshold, like ~20MB (or a certain number of objects?). Would that make sense?

0

Denis,

Thanks for investigation. I checked the code, but seems there is no limit for SWC file size.

Is it possible to create new project, add one of those big SWC files as a dependency and check if it will be resolved fine? 

0

Hi Yaroslav,

Yes, this is what I did. I have only both SWC files (or I can have just one of them as well) as dependencies in a blank project.

As soon as I remove enough clips from those SWCs, they are resolved fine in IntelliJ.

Actually, I also created a brand new XFL & SWC. I populated the XFL library with 434 png files exported to AS3 (PNG lossless compression), and nothing else. It generates a 130MB SWC file. I add the SWC as the only dependency in a blank project. This reproduces the issue: the classes are not resolved, but the project can still be compiled. Then I make 2 tests:

  • I remove png files from AS3 export to progressively reduce the SWC file size. The problem is solved in IntelliJ as soon as the file size reaches 20MB.
  • I leave all 434 png files for AS3 export, but as JPG-80% (instead of PNG-lossless). The resulting SWC file is now 20MB. Problem solved in IntelliJ.

This seems to show that the issue really depends on the global file size, rather than the number of items in the SWC.

0

Absolutely! 🙂

Thank you very much, I would never have worked this out.

0

Denis,

You are welcome! Feel free to contact us if you need any assistance.

0

Please sign in to leave a comment.