After importing a project into Android studio, if I want to compile or run the project it throws an error:
Error:(61, 65) java: diamond operator is not supported in -source 1.6
(use -source 7 or higher to enable diamond operator)
Does anyone know what it is and how to solve it ?
In Android Studio (File -> Project Structure..., Properties tab), set the following values:
Source Compatibility == 1.7
Target Compatibility == 1.7
After this your build.gradle will have these entries:
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}