Gradle execution error in Android Studio (Ubuntu)

ε祈祈猫儿з 提交于 2019-12-08 19:53:13

问题


I have a fresh install of Ubuntu and Android Studio. I have installed open jdk7 (for some reason it ended up in directories suffixed "amd64" even though I am running an Intel CPU, but I guess that's just a name?) as well as some SDK files.

I then created an empty project and now I am getting an error displayed near the bottom of the window. I guess this is a Gradle error (am very new to AS)

Error:Execution failed for task ':app:mergeDebugResources'.
> /root/AndroidStudioProjects/HockeyGame/app/build/exploded-aar/com.android.support/appcompat-v7/19.1.0/res/drawable-xxhdpi/abc_ic_voice_search.png: Error: Cannot run program "/opt/android-studio/sdk/build-tools/android-4.4.2/aapt": error=2, No such file or directory

I was thinking maybe this was a file privilege problem (because aapt does indeed seem to exist), so I set the privileges to 775 recursively. And I am also starting AS with sudo (sudo sh studio.sh).

Any ideas? I am partly trying AS out in Android because I was having problems getting it to run under a cluttered Windows install (and also for the fun of it), so this is disappointing.

edit: It turned out 64-bit Ubuntu isn't fit to run 32-bit executables out of the box.


回答1:


I solved it by running

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

Reference: https://code.google.com/p/android/issues/detail?id=67155



来源:https://stackoverflow.com/questions/23456773/gradle-execution-error-in-android-studio-ubuntu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!