Hi Android Developers,
I have a problem with string splitting in android in tells that change the java compliance to JRE 1.7 when i changed the compliance error occurs because it works only in api level 19
String st="a,b,c,d";
String[] temp=st.split(",");
for(int i=0;i<temp.lenght;i++)
{
switch(temp[i])
{
case "a":
//print something
break;
case "b":
//print something
break;
case "c":
//print something
break;
case "d":
//print something
break;
default:
//print something
}
}
The error is in the switch statement, how can I solve it I am developing in 2.3 devices?
The error:
[2014-08-22 11:47:26 - text] Using 1.7 requires compiling with Android 4.4 (KitKat); currently using API 8