android switch(String)错误:Cannot switch on a value of type String for source level below 1.7...

switch语句的判断条件可以接受int,byte,char,short,不能接受其他类型 只有JDK版本1.7以上才可以支持String 设置如下可解决问题:(若没有JDK1.7版,可下载一下安装) 菜单选项--》project->properties->java compiler->compiler compliance level:选1.7即可
相关文章
相关标签/搜索