// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven {
url \"h
I had the same issue after adding:
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
It was because my default java version was 10:
$ java -version
java version "10.0.1" 2018-04-17
After changing to 1.8 (with sudo update-alternatives --config java) issue was fixed.