add targetCompatibility = 1.8 to build.gradle