I recently installed the latest stable version of Android Studio on my Ubuntu 14.04 LTS. The SDK is configured correctly.
I created one project "Activity" from an empty activity template and did not make any changes to it.
When I try to create or clean up, I get sporadically the following:
Failed to complete Gradle execution. Cause: Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
This one seems to be caused by the heap size of the VM. but adding XX:MaxPermSize=1024m causes it to happen less than once, which means sometimes I don't get this error without changing anything. so either its not a real solution, or 1024 m is not enough (which seems wrong ..)
However, when I do not get this error, the assembly still fails:
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
the witch is not very informative.
source share