I am trying to use the diamond operator, but I am getting the following message:
diamond operator is not supported in -source 1.5 (use -source 7 or higher to enable diamond operator)
Is it fixable in netbeans with android?
API 19 KitKat Diamonds are now allowed. Below are Gradle edits needed to implement for Android Studio. Also make sure you are using JDK 1.7 and Gradle plugin later than 0.6.1
android {
compileSdkVersion 19
buildToolsVersion "19.0.0"
defaultConfig {
minSdkVersion 7
targetSdkVersion 19
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With