When I upgraded to Android Studio 15 (Dolphin) I got this error, and it is sooooo easy to fix. This answer is the easiest, fastest and the best...
In androidAndroid Studio I just did this:
Preferences->Build,Execution,Deployment->Build Tools-> Gradle SelectPreferences → Build,Execution,Deployment → Build Tools → *Gradle. Select Java 11 or 12, etc..
Easy peasy
See the picture.
