I was working on an android project using eclipse and suddenly i started to get this error:
Cannot switch on a value of type String for source level below 1.7. Only convertible int values or enum variables are permitted.
I tried every solution in previous similar issues but none of them worked for me...
I have Tried fixing the project and setting the JDK compliance level to 1.7 in both my project and for all project.
I am using ADT Build: v22.2.1-833290 and Eclipse:
String text = mService.getString();
switch (text) {
case Protocols.REQUEST_SEND_MESSAGE:
publishProgress("sent");
break;
case Protocols.RESPONSE_OK:
mService.sendMessage("mesasage");
publishProgress("sent");
break;
default:
break;
}
What's going on?