、私はAndroidのコーディング私は日食のAndroidアプリを開発してい
switch(String){
......
}
のようないくつかのコードをしようとすると、それは私に
Cannot switch on a value of type String for source level below 1.7. Only convertible int values or enum variables are permitted
ので、私が変更、次のエラーを与えますコンパイラを1.7に変更すると、別のエラーが発生する
Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
これで、switch(String)をAndroidアプリケーションで動作させることはできますか? または私はあなたが選択肢がない
if(){}
else if(){}
else if(){}
........
これをご覧くださいhttp://adackoverflow.com/questions/338206/switch-statement-with-strings-in-javaそれはいくつかの興味深い答えを持っています – RNJ