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.