switch case statement error: case expressions must be constant expression

后端 未结 9 1393
予麋鹿
予麋鹿 2020-12-04 07:51

My switch-case statement works perfectly fine yesterday. But when I run the code earlier this morning eclipse gave me an error underlining the case statements in color red a

9条回答
  •  -上瘾入骨i
    2020-12-04 08:28

    R.id.*, since ADT 14 are not more declared as final static int so you can not use in switch case construct. You could use if else clause instead.

提交回复
热议问题