5

I've recently installed the newest stable version of Android Studio, on my Ubuntu 14.04 LTS. SDK been configured properly.

I created a single 'Activity' project from the blank Activity template, and made no changes to it.

When trying to build, or clean I get sporadically the followi:

Failed to complete Gradle execution.

Cause:
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)

That seems to be caused by VM's heap size. but adding XX:MaxPermSize=1024m only makes it occur fewer times, meaning, sometimes I don't get this error, without changing anything. so either its not the real solution, or 1024m is not enough (which doesn't seems right..)

However, when I don't get this error, build is still failing with:

Information:Gradle tasks [:app:assembleDebug]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:checkDebugManifest
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources
/home/a/Android/Sdk/build-tools/19.1.0/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
/home/a/Android/Sdk/build-tools/19.1.0/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
/home/a/Android/Sdk/build-tools/19.1.0/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
/home/a/Android/Sdk/build-tools/19.1.0/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
:app:mergeDebugResources FAILED
/home/a/AndroidStudioProjects/useless/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Error:Error: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/a/Android/Sdk/build-tools/19.1.0/aapt'' finished with non-zero exit value 127
Error:Execution failed for task ':app:mergeDebugResources'.
> /home/a/AndroidStudioProjects/useless/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: Error: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/a/Android/Sdk/build-tools/19.1.0/aapt'' finished with non-zero exit value 127
Information:BUILD FAILED
Information:Total time: 13.341 secs
Information:2 errors
Information:0 warnings
Information:See complete output in console

witch is not really informative.

Community
  • 1
  • 1
nobatlinux
  • 347
  • 2
  • 10

3 Answers3

6

OK, as strange is may this solves the problem (the second one). It's strange because there is no way to understand it from gradle outout.

Community
  • 1
  • 1
nobatlinux
  • 347
  • 2
  • 10
6

You have to install These Packages to Solve this Error Because Android SDK Still not working on UBUNTU 64 Bit.

sudo apt-get install lib32stdc++6
sudo apt-get install lib32z1
hash
  • 5,336
  • 7
  • 36
  • 59
0

In ubuntu 14.10[64 bits] & 15.04[64 bits] you can solved this problem and also this problem with genymotion

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386

Good Luck!!

Community
  • 1
  • 1
David Hackro
  • 3,652
  • 6
  • 41
  • 61