Windows AIR 64位上的Adobe AIR ADT创建包缺少图标

时间:2014-02-21 11:01:49

标签: android air adobe package windows-7-x64

我正在尝试打包我的第一个Android应用程序,但我遇到了图标png文件的问题。

我的包的目录结构如下:

bin
cer
  -- Jazz Cert.p12
src
  -- assets
       -- icon16.png
       -- icon32.png
       -- icon48.png
       -- icon72.png
       -- icon128.png
  -- test.swf
  -- test.xml

我的描述符文件的内容如下:

<?xml version="1.0" encoding="UTF-8"?> 
<application xmlns="http://ns.adobe.com/air/application/4.0"> 
    <id>com.jazz.android.viewer.jazztest.DesignByJazz.1-0</id> 
    <versionNumber>1.0.0</versionNumber> 
    <filename>Design Jazz Test App</filename> 
    <versionLabel>1.0.0</versionLabel>
    <supportedProfiles>mobileDevice</supportedProfiles>
    <customUpdateUI>false</customUpdateUI>
    <allowBrowserInvocation>false</allowBrowserInvocation>
    <initialWindow> 
        <content>./test.swf</content> 
        <fullScreen>true</fullScreen>
        <aspectRatio>portrait</aspectRatio><!-- landscape -->
        <autoOrients>false</autoOrients>
        <visible>true</visible>
        <renderMode>gpu</renderMode> <!-- cpu -->
    </initialWindow> 
    <android>
       <manifestAdditions>
        <![CDATA[
        <manifest>
           <uses-permission android:name="android.permission.INTERNET"/>
           <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
           <supports-screens android:normalScreens="true"/>
           <uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
           <application android:enabled="true">
               <activity android:excludeFromRecents="false">
                   <intent-filter>
                       <action android:name="android.intent.action.MAIN"/>
                       <category android:name= "android.intent.category.LAUNCHER"/>
                   </intent-filter>
               </activity>
           </application>
        </manifest>
        ]]>
        </manifestAdditions>
    </android>
    <icon> 
        <image16x16>./assets/icon16.png</image16x16>
        <image32x32>./assets/icon32.png</image32x32>    
        <image48x48>./assets/icon48.png</image48x48>
        <image72x72>./assets/icon72.png</image72x72>
        <image128x128>./assets/icon128.png</image128x128>
    </icon>
</application>

我收到的错误如下:

C:\AIRSDK_Compiler\projects\libracalc\src>adt -package -target apk -storetype pk
cs12 -keystore ../cer/JazzCert.p12 ../bin/test.apk test.xml test.swf
password:
C:\AIRSDK_Compiler\projects\libracalc\src\test.xml: error 303: Icon assets/icon1
6.png is missing from package
C:\AIRSDK_Compiler\projects\libracalc\src\test.xml: error 303: Icon assets/icon1
28.png is missing from package
C:\AIRSDK_Compiler\projects\libracalc\src\test.xml: error 303: Icon assets/icon4
8.png is missing from package
C:\AIRSDK_Compiler\projects\libracalc\src\test.xml: error 303: Icon assets/icon7
2.png is missing from package
C:\AIRSDK_Compiler\projects\libracalc\src\test.xml: error 303: Icon assets/icon3
2.png is missing from package

我尝试将xml文件中的路径更改为“assets /”|| “./assets/”等但无法让它工作请帮助: - )

1 个答案:

答案 0 :(得分:2)

感谢simon314的评论,因为它引导我找到答案。

似乎你可以打包单个文件,所以我只是在命令行中包含所有图标文件,如下所示:

c:\AIRSDK_Compiler\projects\libracalc\src>adt -package -target apk -storetype pk
cs12 -keystore ../cer/JazzCert.p12 ../bin/test.apk test.xml test.swf assets/icon
16.png assets/icon32.png assets/icon48.png assets/icon72.png assets/icon128.png
password:
NOTE: The application has been packaged with a shared runtime.

成功!!