title: Cannot build apktool on Ubuntu 14.04
body: <p>I'm trying to build apktool (tool for decompiling android apk files).<br/>
  The instructions how to build are at <a href="http://ibotpeaches.github.io/Apktool/build/" rel="nofollow">http://ibotpeaches.github.io/Apktool/build/</a> <br>
  The problem is with the command <code>./gradlew build fatJar</code><br/>
  The errors that I receive are:</p>
  
  <pre><code>brut.androlib.SharedLibraryTest &gt; isSharedResourceDecodingAndRebuildingWorking FAILED
      brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0-eng.ibotpeaches.20141225.072308, -F, /tmp/APKTOOL134713816630716118.tmp, -0, arsc, -I, /tmp/BRUT4423679278565619004.tmp/1.apk, -I, /tmp/BRUT4423679278565619004.tmp/2-shared.apk, -S, /tmp/BRUT4423679278565619004.tmp/client.apk.out/res, -M, /tmp/BRUT4423679278565619004.tmp/client.apk.out/AndroidManifest.xml]
          at brut.androlib.Androlib.buildResourcesFull(Androlib.java:459)
          at brut.androlib.Androlib.buildResources(Androlib.java:397)
          at brut.androlib.Androlib.build(Androlib.java:285)
          at brut.androlib.SharedLibraryTest.isSharedResourceDecodingAndRebuildingWorking(SharedLibraryTest.java:102)
          Caused by:
          brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0-eng.ibotpeaches.20141225.072308, -F, /tmp/APKTOOL134713816630716118.tmp, -0, arsc, -I, /tmp/BRUT4423679278565619004.tmp/1.apk, -I, /tmp/BRUT4423679278565619004.tmp/2-shared.apk, -S, /tmp/BRUT4423679278565619004.tmp/client.apk.out/res, -M, /tmp/BRUT4423679278565619004.tmp/client.apk.out/AndroidManifest.xml]
              at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:419)
              at brut.androlib.Androlib.buildResourcesFull(Androlib.java:445)
              ... 3 more
              Caused by:
              brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0-eng.ibotpeaches.20141225.072308, -F, /tmp/APKTOOL134713816630716118.tmp, -0, arsc, -I, /tmp/BRUT4423679278565619004.tmp/1.apk, -I, /tmp/BRUT4423679278565619004.tmp/2-shared.apk, -S, /tmp/BRUT4423679278565619004.tmp/client.apk.out/res, -M, /tmp/BRUT4423679278565619004.tmp/client.apk.out/AndroidManifest.xml]
                  at brut.util.OS.exec(OS.java:93)
                  at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:413)
                  ... 4 more
                  Caused by:
                  java.io.IOException: Cannot run program "/tmp/brut_util_Jar_9054478823788249311.tmp": error=2, No such file or directory
                      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
                      at java.lang.Runtime.exec(Runtime.java:617)
                      at java.lang.Runtime.exec(Runtime.java:485)
                      at brut.util.OS.exec(OS.java:84)
                      ... 5 more
                      Caused by:
                      java.io.IOException: error=2, No such file or directory
                          at java.lang.UNIXProcess.forkAndExec(Native Method)
                          at java.lang.UNIXProcess.&lt;init&gt;(UNIXProcess.java:186)
                          at java.lang.ProcessImpl.start(ProcessImpl.java:130)
                          at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
                          ... 8 more
  brut.androlib.ProviderAttributeTest &gt; isProviderStringReplacementWorking FAILED
      brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 22, --version-code, 1, --version-name, 1.0, -F, /tmp/APKTOOL5763864884088802643.tmp, -0, arsc, -I, /home/ran/apktool/framework/1.apk, -S, /tmp/BRUT4214352291584370372.tmp/issue636.apk.out/res, -M, /tmp/BRUT4214352291584370372.tmp/issue636.apk.out/AndroidManifest.xml]
          at brut.androlib.Androlib.buildResourcesFull(Androlib.java:459)
          at brut.androlib.Androlib.buildResources(Androlib.java:397)
          at brut.androlib.Androlib.build(Androlib.java:285)
          at brut.androlib.ProviderAttributeTest.isProviderStringReplacementWorking(ProviderAttributeTest.java:59)
          Caused by:
          brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 22, --version-code, 1, --version-name, 1.0, -F, /tmp/APKTOOL5763864884088802643.tmp, -0, arsc, -I, /home/ran/apktool/framework/1.apk, -S, /tmp/BRUT4214352291584370372.tmp/issue636.apk.out/res, -M, /tmp/BRUT4214352291584370372.tmp/issue636.apk.out/AndroidManifest.xml]
              at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:419)
              at brut.androlib.Androlib.buildResourcesFull(Androlib.java:445)
              ... 3 more
              Caused by:
              brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 22, --version-code, 1, --version-name, 1.0, -F, /tmp/APKTOOL5763864884088802643.tmp, -0, arsc, -I, /home/ran/apktool/framework/1.apk, -S, /tmp/BRUT4214352291584370372.tmp/issue636.apk.out/res, -M, /tmp/BRUT4214352291584370372.tmp/issue636.apk.out/AndroidManifest.xml]
                  at brut.util.OS.exec(OS.java:93)
                  at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:413)
                  ... 4 more
                  Caused by:
                  java.io.IOException: Cannot run program "/tmp/brut_util_Jar_9054478823788249311.tmp": error=2, No such file or directory
                      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
                      at java.lang.Runtime.exec(Runtime.java:617)
                      at java.lang.Runtime.exec(Runtime.java:485)
                      at brut.util.OS.exec(OS.java:84)
                      ... 5 more
                      Caused by:
                      java.io.IOException: error=2, No such file or directory
                          at java.lang.UNIXProcess.forkAndExec(Native Method)
                          at java.lang.UNIXProcess.&lt;init&gt;(UNIXProcess.java:186)
                          at java.lang.ProcessImpl.start(ProcessImpl.java:130)
                          at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
                          ... 8 more
  brut.androlib.BuildAndDecodeJarTest &gt; classMethod FAILED
      brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, -F, /tmp/BRUT3478421848789513632.tmp/testjar.jar, -0, arsc, /tmp/BRUT3478421848789513632.tmp/testjar-orig/build/apk]
          at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:419)
          at brut.androlib.Androlib.buildApk(Androlib.java:661)
          at brut.androlib.Androlib.build(Androlib.java:290)
          at brut.androlib.BuildAndDecodeJarTest.beforeClass(BuildAndDecodeJarTest.java:45)
          Caused by:
          brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, -F, /tmp/BRUT3478421848789513632.tmp/testjar.jar, -0, arsc, /tmp/BRUT3478421848789513632.tmp/testjar-orig/build/apk]
              at brut.util.OS.exec(OS.java:93)
              at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:413)
              ... 3 more
              Caused by:
              java.io.IOException: Cannot run program "/tmp/brut_util_Jar_9054478823788249311.tmp": error=2, No such file or directory
                  at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
                  at java.lang.Runtime.exec(Runtime.java:617)
                  at java.lang.Runtime.exec(Runtime.java:485)
                  at brut.util.OS.exec(OS.java:84)
                  ... 4 more
                  Caused by:
                  java.io.IOException: error=2, No such file or directory
                      at java.lang.UNIXProcess.forkAndExec(Native Method)
                      at java.lang.UNIXProcess.&lt;init&gt;(UNIXProcess.java:186)
                      at java.lang.ProcessImpl.start(ProcessImpl.java:130)
                      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
                      ... 7 more
  brut.androlib.BuildAndDecodeTest &gt; classMethod FAILED
      brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --version-code, 1, --version-name, 1.0, -F, /tmp/APKTOOL4080305473457824664.tmp, -0, arsc, -I, /home/ran/apktool/framework/1.apk, -S, /tmp/BRUT8741597800933526375.tmp/testapp-orig/res, -M, /tmp/BRUT8741597800933526375.tmp/testapp-orig/AndroidManifest.xml]
          at brut.androlib.Androlib.buildResourcesFull(Androlib.java:459)
          at brut.androlib.Androlib.buildResources(Androlib.java:397)
          at brut.androlib.Androlib.build(Androlib.java:285)
          at brut.androlib.BuildAndDecodeTest.beforeClass(BuildAndDecodeTest.java:47)
          Caused by:
          brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --version-code, 1, --version-name, 1.0, -F, /tmp/APKTOOL4080305473457824664.tmp, -0, arsc, -I, /home/ran/apktool/framework/1.apk, -S, /tmp/BRUT8741597800933526375.tmp/testapp-orig/res, -M, /tmp/BRUT8741597800933526375.tmp/testapp-orig/AndroidManifest.xml]
              at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:419)
              at brut.androlib.Androlib.buildResourcesFull(Androlib.java:445)
              ... 3 more
              Caused by:
              brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_9054478823788249311.tmp, p, --forced-package-id, 127, --version-code, 1, --version-name, 1.0, -F, /tmp/APKTOOL4080305473457824664.tmp, -0, arsc, -I, /home/ran/apktool/framework/1.apk, -S, /tmp/BRUT8741597800933526375.tmp/testapp-orig/res, -M, /tmp/BRUT8741597800933526375.tmp/testapp-orig/AndroidManifest.xml]
                  at brut.util.OS.exec(OS.java:93)
                  at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:413)
                  ... 4 more
                  Caused by:
                  java.io.IOException: Cannot run program "/tmp/brut_util_Jar_9054478823788249311.tmp": error=2, No such file or directory
                      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
                      at java.lang.Runtime.exec(Runtime.java:617)
                      at java.lang.Runtime.exec(Runtime.java:485)
                      at brut.util.OS.exec(OS.java:84)
                      ... 5 more
                      Caused by:
                      java.io.IOException: error=2, No such file or directory
                          at java.lang.UNIXProcess.forkAndExec(Native Method)
                          at java.lang.UNIXProcess.&lt;init&gt;(UNIXProcess.java:186)
                          at java.lang.ProcessImpl.start(ProcessImpl.java:130)
                          at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
                          ... 8 more
  6 tests completed, 4 failed
  :brut.apktool:apktool-lib:test FAILED
  FAILURE: Build failed with an exception.
  * What went wrong:
  Execution failed for task ':brut.apktool:apktool-lib:test'.
  &gt; There were failing tests. See the report at: file:///home/ran/Apktool/brut.apktool/apktool-lib/build/reports/tests/index.html
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  BUILD FAILED
  </code></pre>
  
  <p>I tried it several times, but received the same errors.<br/>
  What can I do to fix it?<br/>
  (Somehow in Ubuntu 12.04 it works, but not on Ubuntu 14.04).</p>
  
  <p>EDIT<br/>
  The jar file ./brut.apktool/apktool-cli/build/libs/apktool-cli.jar was created, but the errors remain.</p>