Ubuntu – Gradle project refresh failed- Android Studio 2.2


I just installed Android Studio 2.2 and from start I am getting this error.

Error: Process 'command'/usr/local/android-studio/jre/bin/java" finished with non-zero exit value 2

How can I fix this error?

Best Answer

It's seems to you have not installed properly Oracle Java SDK 8? Please follow steps described here: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html