« Silverlight: The good, the bad and the ugly | Main | Flash Player Explosion »
AIR Export Bug?
| By Rich Tretola | July 24, 2008 | Print This Post
|
| 193 views |
Here is the setup:
You have a simple air application that embeds a single png in an Image component from an icons folder (see Flex Builder navigator view below).
- <?xml version="1.0" encoding="utf-8"?>
- <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
- layout="absolute"
- title="AIR Export Bug?">
- <mx:Image source="@Embed('icons/AIRApp_128.png')"
- horizontalCenter="0" verticalCenter="0"/>
- </mx:WindowedApplication>

So far so good and the applications runs.

Now here is the problem.
I update the configuration file to use the same image as one of the application icons as shown below:
- <icon>
- <image16x16>icons/AIRApp_16.png</image16x16>
- <image32x32>icons/AIRApp_32.png</image32x32>
- <image48x48>icons/AIRApp_48.png</image48x48>
- <image128x128>icons/AIRApp_128.png</image128x128>
- </icon>
Now when I attempt to export a release build, the compiler can no longer find the icon and fails on compile.
Notice the file missing and the error when the attempt fails:


To fix the issue, you have 2 choices:
So, is this a bug? Is it expected behavior, and if so why?
Topics: Adobe AIR |








July 24th, 2008 at 8:49 am
I’ve run into this one a time or two. If an asset is embedded, it looks like Flexbuilder ignores it and won’t export it as a loose asset. I’ve always had to work around it and have 2 copies of the icon image in my app. One for the AIR icon, and one to use internally.
July 24th, 2008 at 9:07 am
Yes, I have done the same but it seems like a bug to me. Do you know if the same issue exists when compiling with the SDK? Or, is it simply a Flex Builder issue?
July 24th, 2008 at 10:05 am
Its a know issue with Flex Builder.
mike chambers
mesh@adobe.com
July 24th, 2008 at 10:20 am
wow! I have this problem with my system tray icon (16×16px).. But I really thought that is Flex Builder feature that it’s not possible to use something as icon and as embed image…
July 24th, 2008 at 10:29 am
Thanks for the information Mike.
July 24th, 2008 at 12:59 pm
arg! this same issue has driven me nuts trying to suss out before.. I ended up duplicating the image..