title: Phonegap build on Android keeps failing
body: <p>I am currently working on a phonegap app and wanted to test it on my phone. However the android build keeps failing and I can't figure out why. Here is the log. Thanks for any help. I've tried building it multiple times but I cant figure out what is wrong.</p>
  
  <pre><code>Build Date: 2015-07-23 11:52:12 +0000
  ----------------------------------------------
  Buildfile: /project/build.xml
  
  -set-mode-check:
  
  -set-debug-files:
  
  -check-env:
   [checkenv] Android SDK Tools Revision 24.3.0
  
  -setup:
       [echo] Project Name: InSize
    [gettype] Project Type: Application
  
  -set-debug-mode:
  
  -debug-obfuscation-check:
  
  -pre-build:
  
  -build-setup:
  [getbuildtools] Using latest Build Tools: 20.0.0
       [echo] Resolving Build Target for InSize...
  [gettarget] Project Target:   Android 5.0.1
  [gettarget] API level:        21
       [echo] ----------
       [echo] Creating output directories if needed...
      [mkdir] Created dir: /project/bin
      [mkdir] Created dir: /project/bin/res
      [mkdir] Created dir: /project/bin/rsObj
      [mkdir] Created dir: /project/bin/rsLibs
      [mkdir] Created dir: /project/gen
      [mkdir] Created dir: /project/bin/classes
      [mkdir] Created dir: /project/bin/dexedLibs
       [echo] ----------
       [echo] Resolving Dependencies for InSize...
  [dependency] Library dependencies:
  [dependency] 
  [dependency] ------------------
  [dependency] Ordered libraries:
  [dependency] 
  [dependency] ------------------
       [echo] ----------
       [echo] Building Libraries with 'debug'...
  
  nodeps:
  
  -set-mode-check:
  
  -set-debug-files:
  
  -check-env:
   [checkenv] Android SDK Tools Revision 24.3.0
  
  -setup:
       [echo] Project Name: CordovaLib
    [gettype] Project Type: Android Library
  
  -set-debug-mode:
  
  -debug-obfuscation-check:
  
  -pre-build:
  
  -build-setup:
  [getbuildtools] Using latest Build Tools: 20.0.0
       [echo] Resolving Build Target for CordovaLib...
  [gettarget] Project Target:   Android 5.0.1
  [gettarget] API level:        21
       [echo] ----------
       [echo] Creating output directories if needed...
      [mkdir] Created dir: /project/CordovaLib/res
      [mkdir] Created dir: /project/CordovaLib/libs
      [mkdir] Created dir: /project/CordovaLib/bin
      [mkdir] Created dir: /project/CordovaLib/bin/res
      [mkdir] Created dir: /project/CordovaLib/bin/rsObj
      [mkdir] Created dir: /project/CordovaLib/bin/rsLibs
      [mkdir] Created dir: /project/CordovaLib/gen
      [mkdir] Created dir: /project/CordovaLib/bin/classes
      [mkdir] Created dir: /project/CordovaLib/bin/dexedLibs
       [echo] ----------
       [echo] Resolving Dependencies for CordovaLib...
  [dependency] Library dependencies:
  [dependency] No Libraries
  [dependency] 
  [dependency] ------------------
  
  -code-gen:
  [mergemanifest] Merging AndroidManifest files into one.
  [mergemanifest] Manifest merger disabled. Using project manifest only.
       [echo] Handling aidl files...
       [aidl] No AIDL files to compile.
       [echo] ----------
       [echo] Handling RenderScript files...
       [echo] ----------
       [echo] Handling Resources...
       [aapt] Generating resource IDs...
       [echo] ----------
       [echo] Handling BuildConfig class...
  [buildconfig] Generating BuildConfig class.
  
  -pre-compile:
  
  -compile:
      [javac] Compiling 98 source files to /project/CordovaLib/bin/classes
      [javac] Note: Some input files use or override a deprecated API.
      [javac] Note: Recompile with -Xlint:deprecation for details.
       [echo] Creating library output jar file...
        [jar] Building jar: /project/CordovaLib/bin/classes.jar
  
  -post-compile:
  
  -obfuscate:
  
  -dex:
       [echo] Library project: do not convert bytecode...
  
  -crunch:
     [crunch] Crunching PNG Files in source dir: /project/CordovaLib/res
     [crunch] To destination dir: /project/CordovaLib/bin/res
     [crunch] Crunched 0 PNG files to update cache
  
  -package-resources:
       [echo] Library project: do not package resources...
  
  -package:
       [echo] Library project: do not package apk...
  
  -post-package:
  
  -do-debug:
       [echo] Library project: do not create apk...
  [propertyfile] Creating new property file: /project/CordovaLib/bin/build.prop
  [propertyfile] Updating property file: /project/CordovaLib/bin/build.prop
  [propertyfile] Updating property file: /project/CordovaLib/bin/build.prop
  [propertyfile] Updating property file: /project/CordovaLib/bin/build.prop
  
  -post-build:
  
  debug:
  
  -code-gen:
  [mergemanifest] Merging AndroidManifest files into one.
  [mergemanifest] Manifest merger disabled. Using project manifest only.
       [echo] Handling aidl files...
       [aidl] No AIDL files to compile.
       [echo] ----------
       [echo] Handling RenderScript files...
       [echo] ----------
       [echo] Handling Resources...
       [aapt] Generating resource IDs...
       [echo] ----------
       [echo] Handling BuildConfig class...
  [buildconfig] Generating BuildConfig class.
  
  -pre-compile:
  
  -compile:
      [javac] Compiling 43 source files to /project/bin/classes
      [javac] Note: Some input files use or override a deprecated API.
      [javac] Note: Recompile with -Xlint:deprecation for details.
      [javac] Note: Some input files use unchecked or unsafe operations.
      [javac] Note: Recompile with -Xlint:unchecked for details.
  
  -post-compile:
  
  -obfuscate:
  
  -dex:
        [dex] input: /project/bin/classes
        [dex] input: /project/CordovaLib/bin/classes.jar
        [dex] Pre-Dexing /project/CordovaLib/bin/classes.jar -&gt; classes-c6b3a3aefa7b3c48b86c5ea60cddcdeb.jar
        [dex] Converting compiled files and external libraries into /project/bin/classes.dex...
         [dx] Merged dex A (131 defs/214.5KiB) with dex B (223 defs/326.3KiB). Result is 354 defs/660.6KiB. Took 0.4s
  
  -crunch:
     [crunch] Crunching PNG Files in source dir: /project/res
     [crunch] To destination dir: /project/bin/res
     [crunch] Processing image to cache: /project/res/drawable-hdpi/ic_action_next_item.png =&gt; /project/bin/res/drawable-hdpi/ic_action_next_item.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-hdpi/ic_action_next_item.png: 0% size of source)
     [crunch] Processing image to cache: /project/res/drawable-hdpi/ic_action_previous_item.png =&gt; /project/bin/res/drawable-hdpi/ic_action_previous_item.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-hdpi/ic_action_previous_item.png: 0% size of source)
     [crunch] Processing image to cache: /project/res/drawable-hdpi/ic_action_remove.png =&gt; /project/bin/res/drawable-hdpi/ic_action_remove.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-hdpi/ic_action_remove.png: 0% size of source)
     [crunch] Processing image to cache: /project/res/drawable-hdpi/icon.png =&gt; /project/bin/res/drawable-hdpi/icon.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-hdpi/icon.png: 52% size of source)
     [crunch] Processing image to cache: /project/res/drawable-ldpi/icon.png =&gt; /project/bin/res/drawable-ldpi/icon.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-ldpi/icon.png: 0% size of source)
     [crunch] Processing image to cache: /project/res/drawable-mdpi/ic_action_next_item.png =&gt; /project/bin/res/drawable-mdpi/ic_action_next_item.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-mdpi/ic_action_next_item.png: 0% size of source)
     [crunch] Processing image to cache: /project/res/drawable-mdpi/ic_action_previous_item.png =&gt; /project/bin/res/drawable-mdpi/ic_action_previous_item.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-mdpi/ic_action_previous_item.png: 0% size of source)
     [crunch] Processing image to cache: /project/res/drawable-mdpi/ic_action_remove.png =&gt; /project/bin/res/drawable-mdpi/ic_action_remove.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-mdpi/ic_action_remove.png: 0% size of source)
     [crunch] Processing image to cache: /project/res/drawable-mdpi/icon.png =&gt; /project/bin/res/drawable-mdpi/icon.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-mdpi/icon.png: 0% size of source)
     [crunch] Processing image to cache: /project/res/drawable-port-hdpi/splash.png =&gt; /project/bin/res/drawable-port-hdpi/splash.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-port-hdpi/splash.png: 105% size of source)
     [crunch] Processing image to cache: /project/res/drawable-port-ldpi/splash.png =&gt; /project/bin/res/drawable-port-ldpi/splash.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-port-ldpi/splash.png: 82% size of source)
     [crunch] Processing image to cache: /project/res/drawable-port-mdpi/splash.png =&gt; /project/bin/res/drawable-port-mdpi/splash.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-port-mdpi/splash.png: 97% size of source)
     [crunch] Processing image to cache: /project/res/drawable-port-xhdpi/splash.png =&gt; /project/bin/res/drawable-port-xhdpi/splash.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-port-xhdpi/splash.png: 109% size of source)
     [crunch] Processing image to cache: /project/res/drawable-xhdpi/ic_action_next_item.png =&gt; /project/bin/res/drawable-xhdpi/ic_action_next_item.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-xhdpi/ic_action_next_item.png: 0% size of source)
     [crunch] Processing image to cache: /project/res/drawable-xhdpi/ic_action_previous_item.png =&gt; /project/bin/res/drawable-xhdpi/ic_action_previous_item.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-xhdpi/ic_action_previous_item.png: 0% size of source)
     [crunch] Processing image to cache: /project/res/drawable-xhdpi/ic_action_remove.png =&gt; /project/bin/res/drawable-xhdpi/ic_action_remove.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-xhdpi/ic_action_remove.png: 0% size of source)
     [crunch] Processing image to cache: /project/res/drawable-xhdpi/icon.png =&gt; /project/bin/res/drawable-xhdpi/icon.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-xhdpi/icon.png: 71% size of source)
     [crunch] Processing image to cache: /project/res/drawable-xxhdpi/ic_action_next_item.png =&gt; /project/bin/res/drawable-xxhdpi/ic_action_next_item.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-xxhdpi/ic_action_next_item.png: 0% size of source)
     [crunch] Processing image to cache: /project/res/drawable-xxhdpi/ic_action_previous_item.png =&gt; /project/bin/res/drawable-xxhdpi/ic_action_previous_item.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-xxhdpi/ic_action_previous_item.png: 0% size of source)
     [crunch] Processing image to cache: /project/res/drawable-xxhdpi/ic_action_remove.png =&gt; /project/bin/res/drawable-xxhdpi/ic_action_remove.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable-xxhdpi/ic_action_remove.png: 0% size of source)
     [crunch] Processing image to cache: /project/res/drawable/icon.png =&gt; /project/bin/res/drawable/icon.png
     [crunch]   (processed image to cache entry /project/bin/res/drawable/icon.png: 53% size of source)
     [crunch] Crunched 21 PNG files to update cache
  
  -package-resources:
       [aapt] Creating full resource package...
       [aapt]     (skipping file '.project' due to ANDROID_AAPT_IGNORE pattern '.*')
       [aapt]     (skipping file '.gitignore' due to ANDROID_AAPT_IGNORE pattern '.*')
       [aapt]     (skipping dir '.gradle' due to ANDROID_AAPT_IGNORE pattern '.*')
       [aapt]     (skipping file '.project' due to ANDROID_AAPT_IGNORE pattern '.*')
       [aapt]     (skipping file '.jshintrc' due to ANDROID_AAPT_IGNORE pattern '.*')
       [aapt]     (skipping file '.npmignore' due to ANDROID_AAPT_IGNORE pattern '.*')
       [aapt]     (skipping file '.travis.yml' due to ANDROID_AAPT_IGNORE pattern '.*')
       [aapt]     (skipping file '.documentup.json' due to ANDROID_AAPT_IGNORE pattern '.*')
       [aapt] Warning: AndroidManifest.xml already defines debuggable (in http://schemas.android.com/apk/res/android); using existing value in manifest.
       [aapt]       Unable to add '/project/assets/www/platforms/android/assets/www/components/bower_components/web-animations-js/web-animations.min.js.gz': file already in archive (try '-u'?)
       [aapt] ERROR: unable to process assets while packaging '/project/bin/InSize.ap_'
       [aapt] ERROR: packaging of '/project/bin/InSize.ap_' failed
  
  BUILD FAILED
  /home/ec2-user/android-sdk/tools/ant/build.xml:928: The following error occurred while executing this line:
  /home/ec2-user/android-sdk/tools/ant/build.xml:946: null returned: 1
  
  Total time: 22 seconds
  </code></pre>