title: Error when proguard Android project
body: <p>I have Project A which uses Project B as library project. Both of them are using android-support-v4.jar as referenced library. When I try to build the project A with the ant script, which provided by Android SDK, I got the following error at -obfuscate step:</p>
  
  <pre><code>[proguard] Preparing output jar [E:\Workspace\GuosenAndroid1.1\bin\proguard\obfuscated.jar]
  [proguard]   Copying resources from program jar [E:\Workspace\GuosenAndroid1.1\bin\proguard\original.jar]
  [proguard]   Copying resources from program jar [E:\Workspace\GuosenAndroid1.1\libs\android-support-v4.jar]
  [proguard] Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [android-support-v4.jar:META-INF/MANIFEST.MF])
  [proguard]   Copying resources from program jar [E:\Workspace\com_viewpagerindicator\bin\classes.jar]
  [proguard] Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [classes.jar:META-INF/MANIFEST.MF])
  [proguard]   Copying resources from program jar [E:\Workspace\com_viewpagerindicator\libs\android-support-v4.jar]
  [proguard] Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [android-support-v4.jar:META-INF/MANIFEST.MF])
  </code></pre>
  
  <p>BUILD FAILED
  E:\Workspace\GuosenAndroid1.1\basicbuild.xml:723: Can't write [E:\Workspace\GuosenAndroid1.1\bin\proguard\obfuscated.jar] (Can't read [E:\Workspace\com_viewpagerindicator\libs\android-support-v4.jar] (Duplicate zip entry [android-support-v4.jar:android/support/v4/content/ModernAsyncTask$WorkerRunnable.class]))</p>
  
  <p>Here is my proguard config:</p>
  
  <pre><code>-libraryjars libs/android-support-v4.jar
  -dontwarn android.support.v4.**
  -optimizationpasses 5
  -dontusemixedcaseclassnames
  -dontskipnonpubliclibraryclasses
  -dontskipnonpubliclibraryclassmembers
  -dontpreverify
  -verbose
  -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
  
  -keep class android.support.** { *; }
  -keep public class * extends android.app.Activity
  -keep public class * extends android.app.Application
  -keep public class * extends android.app.Service
  -keep public class * extends android.content.BroadcastReceiver
  -keep public class * extends android.content.ContentProvider
  -keep public class * extends android.app.backup.BackupAgentHelper
  -keep public class * extends android.preference.Preference
  -keep public class com.android.vending.licensing.ILicensingService
  
  -keepclasseswithmembernames class * {
      native &lt;methods&gt;;
  }
  
  -keepclasseswithmembernames class * {
      public &lt;init&gt;(android.content.Context, android.util.AttributeSet);
  }
  
  -keepclasseswithmembernames class * {
      public &lt;init&gt;(android.content.Context, android.util.AttributeSet, int);
  }
  
  -keepclassmembers enum * {
      public static **[] values();
      public static ** valueOf(java.lang.String);
  }
  
  -keep class * implements android.os.Parcelable {
    public static final android.os.Parcelable$Creator *;
  }
  </code></pre>
  
  <h2>Here is the ant script to execute -obfuscate step using Proguard:</h2>
  
  <pre><code>&lt;target name="-obfuscate"&gt;
      &lt;echo&gt;proguard enabled: ${proguard.enabled}&lt;/echo&gt;
      &lt;if condition="${proguard.enabled}"&gt;
          &lt;then&gt;
              &lt;property name="obfuscate.absolute.dir" location="${out.absolute.dir}/proguard" /&gt;
              &lt;property name="preobfuscate.jar.file" value="${obfuscate.absolute.dir}/original.jar" /&gt;
              &lt;property name="obfuscated.jar.file" value="${obfuscate.absolute.dir}/obfuscated.jar" /&gt;
              &lt;!-- input for dex will be proguard's output --&gt;
              &lt;property name="out.dex.input.absolute.dir" value="${obfuscated.jar.file}" /&gt;
  
              &lt;!-- Add Proguard Tasks --&gt;
              &lt;property name="proguard.jar" location="${android.tools.dir}/proguard/lib/proguard.jar" /&gt;
              &lt;taskdef name="proguard" classname="proguard.ant.ProGuardTask" classpath="${proguard.jar}" /&gt;
  
              &lt;!-- Set the android classpath Path object into a single property. It'll be
                   all the jar files separated by a platform path-separator.
                   Each path must be quoted if it contains spaces.
              --&gt;
              &lt;pathconvert property="android.libraryjars" refid="android.target.classpath"&gt;
                  &lt;firstmatchmapper&gt;
                      &lt;regexpmapper from='^([^ ]*)( .*)$$' to='"\1\2"'/&gt;
                      &lt;identitymapper/&gt;
                  &lt;/firstmatchmapper&gt;
              &lt;/pathconvert&gt;
  
              &lt;!-- Build a path object with all the jar files that must be obfuscated.
                   This include the project compiled source code and any 3rd party jar
                   files. --&gt;
              &lt;path id="project.jars.ref"&gt;
                  &lt;pathelement location="${preobfuscate.jar.file}" /&gt;
                  &lt;path refid="jar.libs.ref" /&gt;
              &lt;/path&gt;
              &lt;!-- Set the project jar files Path object into a single property. It'll be
                   all the jar files separated by a platform path-separator.
                   Each path must be quoted if it contains spaces.
              --&gt;
              &lt;pathconvert property="project.jars" refid="project.jars.ref"&gt;
                  &lt;firstmatchmapper&gt;
                      &lt;regexpmapper from='^([^ ]*)( .*)$$' to='"\1\2"'/&gt;
                      &lt;identitymapper/&gt;
                  &lt;/firstmatchmapper&gt;
              &lt;/pathconvert&gt;
  
              &lt;mkdir   dir="${obfuscate.absolute.dir}" /&gt;
              &lt;delete file="${preobfuscate.jar.file}"/&gt;
              &lt;delete file="${obfuscated.jar.file}"/&gt;
              &lt;jar basedir="${out.classes.absolute.dir}"
                  destfile="${preobfuscate.jar.file}" /&gt;
              &lt;proguard&gt;
                  @${proguard.config}
                  -injars       ${project.jars}
                  -outjars      "${obfuscated.jar.file}"
                  -libraryjars  ${android.libraryjars}
                  -dump         "${obfuscate.absolute.dir}/dump.txt"
                  -printseeds   "${obfuscate.absolute.dir}/seeds.txt"
                  -printusage   "${obfuscate.absolute.dir}/usage.txt"
                  -printmapping "${obfuscate.absolute.dir}/mapping.txt"
              &lt;/proguard&gt;
          &lt;/then&gt;
      &lt;/if&gt;
  </code></pre>
  
  <h2>    </h2>
  
  <p>What should I do to get rid of this error? Thanks.</p>