I've followed the tutorial on building on Linux (Arch) and have run into an issue where it refused to build. Because I have never build anything using the android sdk, it took me quite a while to figure out that the issue is that I did not have the open jdk7 installed. Since I had 8 installed I pointed the JAVA_HOME variable to that, but it just wouldn't build. Running this fixed it for me:
sudo pacman -Ss jre7-openjdk jre7-openjdk-headless jdk7-openjdk export JAVA_HOME=/usr/lib/jvm/java-7-openjdk/
AFAIK the fact that it has to be java 7 which is installed isn't mentioned here anywhere, would be nice if it was written on the Linux building page. .