air打包ipa遇到的错误

在应用程序的描述文件(Descriptor File)里添加图标,内容如下:

<icon>
<image16x16>appResource/icon/icon16.png</image16x16>
<image29x29>appResource/icon/icon29.png</image29x29>
<image32x32>appResource/icon/icon32.png</image32x32>
<image36x36>appResource/icon/icon36.png</image36x36>
<image48x48>appResource/icon/icon48.png</image48x48>
<image57x57>appResource/icon/icon57.png</image57x57>
<image72x72>appResource/icon/icon72.png</image72x72>
<image76x76>appResource/icon/icon76.png</image76x76>
<image114x114>appResource/icon/icon114.png</image114x114>
<image120x120>appResource/icon/icon120.png</image120x120>
<image128x128>appResource/icon/icon128.png</image128x128>
<image152x152>appResource/icon/icon152.png</image152x152>
</icon>

发布过程中报错:

D:\cailian_php\client\trunk\CailianApp\bin-release-temp\AOT\CailianApp-app.xml(136): error 103: application.icon.image76x76 is an unexpected element/attribute

AOT目录是在发布ipa时产生的临时目录,打包完毕会自动清理掉。这个错误的原因是76格式的图片时非法的,实际上下面几个格式都是非法的。

<image76x76>appResource/icon/icon76.png</image76x76>

<image120x120>appResource/icon/icon120.png</image120x120>

<image152x152>appResource/icon/icon152.png</image152x152>


关于air指定应用程序图标可以参考文档air_buildingapps.pdf文档里的这一段:

定义指向应用程序目录对应图标的路径。
可以使用以下图标图像,每个图像指定一个不同的图标大小:
• image16x16
• image29x29 (AIR 2+)
• image32x32
• image36x36 (AIR 2.5+)
• image48x48
• image50x50 (AIR 3.4+)
• image57x57 (AIR 2+)
• image58x58 (AIR 3.4+)
• image72x72 (AIR 2+)
• image100x100 (AIR 3.4+)
• image114x114 (AIR 2.6+)
• image128x128
• image144x144 (AIR 3.4+)
• image512x512 (AIR 2+)
• image1024x1024 (AIR 3.4+)
图标必须是图像元素指示的确切大小的 PNG 图形。图标文件必须包括在应用程序包中;应用程序描述符文档引用的图标不会
自动包括进去。


ADT在打包时产生的一些错误说明参考文档 http://helpx.adobe.com/air/kb/air-developer-tool-adt-error.html


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


  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值