Codificação Android com switch (String)
Estou desenvolvendo um aplicativo android no eclipse, quando eu tento algum código como
switch(String){
......
}
me dá o seguinte erro
Cannot switch on a value of type String for source level below 1.7. Only convertible int values or enum variables are permitted
então eu mudei o compilador para 1.7, então ele me deu outro erro
Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
Então, há alguma maneira de deixar switch (String) funciona no aplicativo android? ou eu não tenho escolha a não ser usar
if(){}
else if(){}
else if(){}
........