Adobe AIR: Error when creating AIR file: 303

Thomas Viktil

I’m currently using Flex Builder 3.0.1.205647 with Flex SDK 3.1.0 and I got an error saying Flex couldn’t create my AIR file. After a bit of googling I found out that it is a bug in Flex Builder 3 (Bug report #FB-11712), and it seems like it will be fixed in the Gumbo release.

The bug is related to adding custom application icons. You do this by editing the application’s xml file. To be more precise, at the lines which looks like these:

<!-- The icon to display for the file type. Optional. -->
<icon>
   <image16x16>icon_16.png</image16x16>
   <image32x32>icon_32.png</image32x32>
   <image48x48>icon_48.png</image48x48>
   <!--image128x128></image128x128-->
</icon>

The solution to this bug is actually quite simple. Simply comment out the icons you don’t plan to use -just like I have done in the example above. Oh, and be sure to tick the check box “Copy non-embedded files to output folder” in Project -> Properties -> Flex Compiler.


3 Responses to “Adobe AIR: Error when creating AIR file: 303”

  • Spy6 Says:

    Another thing I learned is that you might have the icon file embeded in the application somewhere and that removes it from the include in AIR package screen. See more detalis here : http://spy6.blogspot.com/2009/10/error-creating-air-file-303error-some.html

  • Thomas Viktil Says:

    Thanks for the tip!
    I have noticed something similar regarding exporting of AIR projects. One thing that I haven’t found a solution for, but learned to live with, is that when you have assets that are included by either the embed meta tag, Loader or any other method to dynamically load assets, they won’t all be included in the bin-release folder. Once you export an AIR project, the bin-release folder will be created, and some of your files will be copied into it. In order to get the rest of your files, abort the export wizard at the latest possible point and manually copy your files over to the bin-release folder. You have to go through most of the wizard to make this work, because the bin-release folder isn’t normally created, but gets created during the wizard. When you abort the wizard the folder stays. Call it a bug or a feature -I don’t know. It just works :)

  • ShangHai China Says:

    Please sure the icon path is true,the icon size is 16 X 16 or 32 X 32 or 48 X 48 or 132 X 132,
    and the file name is correct (case sentense for example :a.png and a.PNG is not the same)

Leave a Reply