Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
795 views
in Technique[技术] by (71.8m points)

ubuntu - Android studio 1.0.2 not building app:mergeDebugResources error

I just installed android studio on linux , configured the SDK and installed the building tools now when I try to sync with gradle or (build the app) it fails and throws this error :

Error:Execution failed for task ':app:mergeDebugResources'. /home/user_name/AndroidStudioProjects/project_name/app/src/main/res/drawable-hdpi/ic_launcher.png: Error: Cannot run program "/home/user_name/Android/Sdk/build-tools/21.1.2/aapt": error=2, No such file or directory Error:Error: Cannot run program "/home/user_name/Android/Sdk/build-tools/21.1.2/aapt": error=2, No such file or directory /home/user_name/AndroidStudioProjects/project_name/app/src/main/res/drawable-hdpi/ic_launcher.png

I tried to change the ' buildToolsVersion ' in my gradle file and it gave me the same error for 21.1.2 , 1 , 0 also.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I solved the problem by running those commands

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

Ubuntu can't run the aapt on 64 bit before installing this packages

EDIT 19-04-2016 :

Android Studio 2 have the installation guide updated with those packages and bunch more to compile on 64-bit machines correctly

$ sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...