Invalid Gradle JDK configuration found

1.0 Problem

After starting Android studio, running on Ubuntu 15.04 Linux, the following error was reported:

Invalid Gradle JDK configuration found. Open Gradle Settings. Platform SDK does not point to valid SDK (/usr/lib/jvm/jdk1.8.0_40).

2.0 Solution

The problem was solved by clicking in Android Studio, File -> Project Structure -> SDK Location. Under JDK location, enter the correct directory for JDK, for example, /usr/lib/jvm/jdk1.8.0_45. Click OK.