case expressions must be constant expressions
android应用程序调试一直报错:case expressions must be constant expressions
定义的变量为:
public static int TASK_LOGIN = 1;
public static int TASK_REG = 2;
在switch语句段始终报错,switch语句中的case必须是常量表达式。
解决方案如下:
修改常量定义语句:
public static final int TASK_LOGIN = 1;
public static final int TASK_REG = 2;
相关推荐
cakecc00 2020-10-09
yawei 2020-10-09
zhaowj00 2020-07-26
PM实验室 2020-06-16
fly00love 2020-05-16
暗夜之城 2020-04-07
cmsmdn 2020-02-16
FCLAMP 2020-02-14
sunnyxuebuhui 2020-02-12
yogoma 2020-01-13
fengjing81 2020-01-10
singer 2019-12-20
坚持是一种品质 2019-12-07
ericasadun 2019-08-16
KilluaZoldyck 2019-10-23
pbyanglove 2010-06-22
苗疆三刀的随手记 2019-07-01
wolaoreme 2016-09-09
shenjianxz 2016-02-13