Android studio 1.0.2 not building app:mergeDebugResources error
Solution 1:
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
Solution 2:
I had the same issue even after trying out the accepted solution. In my case the gradle build tool version that I've specified was not installed on my debian system. It worked like a charm after I changed the buildToolVersion to the installed version which was (23.0.2)