Failed to create or clear a bare project for one project in a recently installed Android studio

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.

+5
source share
3 answers

You need to install these packages to solve this problem, because the Android SDK still does not work with 64-bit UBUNTU.

 sudo apt-get install lib32stdc++6 sudo apt-get install lib32z1 
+6
source

In ubuntu 14.10 [64 bit] and 15.04 [64 bit] you can solve this problem as well as this problem with genymotion

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

Luck!!

0
source

Source: https://habr.com/ru/post/1214874/


All Articles