Search code examples
actionscript-3flashapache-flexairmxml

How to use Adobe AIR with Flex 4.6 SDK?


I've been trying to use Adobe AIR 3.1 that comes with Flex 4.6 for my project. I have been receiving the error application descriptor not found.

My descriptor file looks like this inside D:/Test/.

<?xml version="1.0" encoding="utf-8"?>
<!-- D:/Test/AIR.xml -->

<application xmlns="http://ns.adobe.com/air/application/3.1">
    <id>Test</id>
    <versionNumber>1.0</versionnumber>
    <filename>Main</filename>
    <initialWindow>
        <content>Main.swf</content>
        <visible>true</visible>
        <width>800</width>
        <height>600</height>
    </initialWindow>
</application>

I build my swf with the following command while Main.mxml is in the /src subdirectory.

D:/Flex/bin/mxmlc.exe -debug=true -swf-version=14 D:/Test/src/Main.mxml

Then the SWF is moved to the /bin subdirectory.

I try using AIR with the following command in the directory D:/Test/.

D:/Flex/bin/adl.exe AIR.xml /bin/

My directory tree looks something like this:

D:/
- Flex/
-- bin/
--- adl.exe
- Test/
-- AIR.xml
-- bin/
--- Main.swf
-- src/
--- Main.mxml

Solution

  • I didn't CamelCase the closing tag: </versionnumber>. It is actually </versionNumber>.

    Also, to run AIR, this is the proper command: D:/Flex/bin/adl.exe AIR.xml

    And finally the content tags now hold this: <content>bin/Main.swf</content>