26 May 2009

If you are using the same icon file in your app.xml file in AIR and embedding it to set it dynamically at runtime (for example if you have several icons that you switch between) then you'll most likely get the following error:

Error creating AIR file: YourApp-app.xml(94): error 303: Icon assets/icon.png is missing from the package.

The Copy non-embedded assets setting in compiler preferences doesn't help you here because you are embedding the icons in order to dynamically switch the application icon at runtime.

The easiest workaround I found was to simply duplicate the icons I wanted to use in the app.xml file (e.g., if my dynamic icon was called icon.png, I simply made a copy called icon-static.png).

Crude, yes. Effective, yes :)

Add Your Comment

Spam Protection by WP-SpamFree

Error 303 for embedded icons in AIR apps

  1. I bumped into same error 303 when leaved empty =image= tag within =icon= block. One error message – two different causes.

    Rodion Bykov
  2. This error has a lot of possible reasons. I got it once when the icon size was not right and once when the images where embeded. Just as you said, I created another copy for the icons.

    You can see more info on my version here : http://spy6.blogspot.com/2009/10/error-creating-air-file-303error-some.html

    Spy6
  3. One other reason on Windows machines is that the path to your icons in yourapp-app.xml file does not match *exactly* the path of your files. In my case, I had a asset/Icons/appLogo-128.png in the xml file and on my system, the file was located under assets/icons/appLogo-128.png – notice the uppercase I in the xml file and lowercase i of i the icon directory. That makes this very strange since on Windows, the path is not case sensitive…

    Breizo
  4. Hi Aral,

    I’m having the same problem, but can’t seem to fix it. Think I’m probably just doing something wrong.

    Tried copying and renaming the icon files.
    Then updated the app.xml to reflect the new names. But the compiler keeps telling me that it can’t find them.

    Ideas?

    Tom