android ant 打包过程中包这样的错误

望天狼0912 发布于 2013/11/18 13:49
阅读 2K+
收藏 0

请教一下,我在使用ant 打包过程中,出现以下的问题,我的目标项目是依托了两个library构建的,在执行命令时,我先android update project --path 我那两个library ,然后在ant release 目标项目,这样就报了下面的错误,google了半天也没找到解决办法,后来测试发现,如果我不添加任何的library ,执行命令是没问题的,只要加入library就报这样的bug,有人说是包冲突问题,但是后来我检查了,已经没有冲突的包了,我使用的是mac 环境,adt 22 ,期待大家的讨论和回复!

-dex:

      [dex] input: /Users/niufei/Documents/androidspace/TableTest/bin/classes
      [dex] input: /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/bin/classes.jar
      [dex] input: /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/commons-httpclient-3.1.jar
      [dex] input: /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/svg-android-1.1.jar
      [dex] input: /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/gson-1.5.jar
      [dex] input: /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/zipAnt.jar
      [dex] input: /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/umeng_sdk.jar
      [dex] input: /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/commons-codec-1.6.jar
      [dex] input: /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/ormlite-core-4.30.jar
      [dex] input: /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/apricotforestcommonpro.jar
      [dex] input: /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/httpmime-4.1.1.jar
      [dex] input: /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/android-support-v4.jar
      [dex] input: /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/ormlite-android-4.30.jar
      [dex] Using Pre-Dexed commons-httpclient-3.1-6cdff9f7c9dbd70b70bb5493e76b2a62.jar <- /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/commons-httpclient-3.1.jar
      [dex] Using Pre-Dexed svg-android-1.1-51e1715b42b8eddb6773095b4f03556d.jar <- /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/svg-android-1.1.jar
      [dex] Using Pre-Dexed gson-1.5-42449df919a7c1e1aa68eb451ab926a3.jar <- /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/gson-1.5.jar
      [dex] Using Pre-Dexed zipAnt-61f8082fb61fbaeea8308d913103802f.jar <- /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/zipAnt.jar
      [dex] Using Pre-Dexed umeng_sdk-c356ee1643bb83a5b63d988e75717831.jar <- /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/umeng_sdk.jar
      [dex] Using Pre-Dexed commons-codec-1.6-eca7acb00e06d91b7fad4cee92ee0348.jar <- /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/commons-codec-1.6.jar
      [dex] Using Pre-Dexed ormlite-core-4.30-cdc877b199512a8c9c8df2b1c8a1f052.jar <- /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/ormlite-core-4.30.jar
      [dex] Using Pre-Dexed apricotforestcommonpro-3e60dab9422ad64d97b5e242f3289e0a.jar <- /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/apricotforestcommonpro.jar
      [dex] Using Pre-Dexed httpmime-4.1.1-098019d50229055b90de6cf986eb7c85.jar <- /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/httpmime-4.1.1.jar
      [dex] Using Pre-Dexed android-support-v4-b1eae7e227203b7c06f6510f6cf3eb96.jar <- /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/android-support-v4.jar
      [dex] Using Pre-Dexed ormlite-android-4.30-b3d3522f910981bc535c865b95ecdd45.jar <- /Users/niufei/Documents/androidspace/ApricotforestCommonLibraryPro_new/libs/ormlite-android-4.30.jar
      [dex] Converting compiled files and external libraries into /Users/niufei/Desktop/ant/classes.dex...
       [dx] 
       [dx] UNEXPECTED TOP-LEVEL EXCEPTION:
       [dx] java.util.zip.ZipException: error in opening zip file
       [dx] at java.util.zip.ZipFile.open(Native Method)
       [dx] at java.util.zip.ZipFile.<init>(ZipFile.java:128)
       [dx] at java.util.zip.ZipFile.<init>(ZipFile.java:145)
       [dx] at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:206)
       [dx] at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)
       [dx] at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)
       [dx] at com.android.dx.command.dexer.Main.processOne(Main.java:422)
       [dx] at com.android.dx.command.dexer.Main.processAllFiles(Main.java:333)
       [dx] at com.android.dx.command.dexer.Main.run(Main.java:209)
       [dx] at com.android.dx.command.dexer.Main.main(Main.java:174)
       [dx] at com.android.dx.command.Main.main(Main.java:91)
       [dx] 1 error; aborting


BUILD FAILED
/Users/niufei/Documents/androidSdk/adt-bundle-mac-x86_64-20130522/sdk/tools/ant/build.xml:885: The following error occurred while executing this line:
/Users/niufei/Documents/androidSdk/adt-bundle-mac-x86_64-20130522/sdk/tools/ant/build.xml:887: The following error occurred while executing this line:
/Users/niufei/Documents/androidSdk/adt-bundle-mac-x86_64-20130522/sdk/tools/ant/build.xml:899: The following error occurred while executing this line:
/Users/niufei/Documents/androidSdk/adt-bundle-mac-x86_64-20130522/sdk/tools/ant/build.xml:281: null returned: 1
加载中
返回顶部
顶部