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
}

最后
以上就是俊秀酸奶最近收集整理的关于漂亮的菱形JAVA语音问题,此语言级别不支持菱形类型的全部内容,更多相关漂亮内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复