The AIR Developer Tool (ADT) performs various development-time operations. There is a script that calls ADT in the bin directories of both the AIR SDK and the Flex SDK. ADT is implemented in Java; the jar file is in the lib directory of the SDKs. ADT requires JRE 1.4 (Sun JRE 1.4.2 on Linux) or later.

You can use ADT directly, or incorporate it into graphical development tools like Flex Builder. It supports the following operations:

  • Packaging AIR applications for delivery
  • Generating self-sign certificates
  • Creating and signing .airi (AIR intermediate) files

You call ADT from the command line.

ADT performs all possible validations during a packaging operation. Validate samples include:

  • The application descriptor is validated against its schema.
  • All references from the descriptor to files contained in the package are checked to make sure that the target files exist.
  • It checks icon files to make sure that they are in a supported format and the correct size.

Errors are printed to the console during packaging. If any errors occur, ADT doesn't create an AIR file. There can be no errors found to successfully package an application. ADT attempts to uncover as many errors as possible during a single invocation.

Validation errors are printed to the command line, using the following syntax:

<file-name>(<line-number>): error <code>: <message>

The (<line-number>) portion is omitted if it does not apply and error codes are listed below. The message is in English, not localized, and is subject to change. Applications processing the error results use the error codes, not messages, to determine which errors have occurred.

Error codes

Each error code uniquely identifies an error condition that can occur. The tables below indicate, for each error code, the identifiers that are returned, if any.

For example, error code 100 is "invalid namespace." It has one associated identifier, which is the namespace found in the descriptor file. It is implicit in the error code that the expected namespace is one that AIR supports.

ADT contains descriptions of the error codes that it uses when run from the command line.

Descriptor validation



Code Description Identifiers
100 Application descriptor cannot be parsed  
101 Namespace is missing  
102 Invalid namespace %1 actual namespace
103 %1 is an unexpected element/attribute element/attribute
104 %1 is required element/attribute
105 %1 contains an invalid value element/attribute
106 Illegal window attribute combination  
107 application.initialWindow.minSize is greater than application.initialWindow.maxSize  


Icons



Code Description Identifiers
200 Icon %1 cannot be opened icon path
201 Icon %1 is wrong size icon path
202 Icon %1 is unsupported format icon path


Missing files



Code Description Identifiers
300 File missing/cannot be opened  
301 Application descriptor missing/cannot be opened  
302 Root content %1 is missing from package root content path
303 Icon %1 is missing from package icon path


Exit codes

ADT exits with one of the following exit codes. For error conditions (code > 1), ADT also prints a diagnostic message to stderr.

Exit Code Meaning
0 Successful primary launch [1]
2 Usage error (incorrect arguments)
5 Unknown error
6 Could not write to output directory
7 Could not access certificate
8 Invalid certificate
9 Could not sign AIR file
10 Could not create timestamp
11 Certificate creation error
12 Invalid input

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy