2014-02-21 22 views
3

我想要打包我的第一個android應用程序,並且遇到圖標png文件有問題。Adob​​e AIR ADT在Windows 7上創建包缺失圖標64位

我的包的目錄結構如下:

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/」等,但不能得到它的工作請幫助:-)

+0

嗨,我想你還需要在命令行中添加資產文件夾路徑(至少你必須在打包桌面時這樣做),以便包含資產 – simion314

回答

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. 

成功!