I'm a beginner in Android Dev. I've just met this problem with a switch case statement on a string :
String str = "Hello";
switch (str) {
case "Hello":
System.out.println("case 1");break;
default:
System.out.println("default");break;
}
Eclispse Logs :
Cannot switch on a value of type String for source level below 1.7. Only convertible int values or enum variables are permitted Home.java
So i'm going to Project properties --> Java Compiler and i set the JDK to 1.7 and applied it. But now eclipse tails me to fix properties which comeback to 1st problem...
Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
How can i fix it to use my switch case ?
Thanks
