Ant编译问题五:×××需要常量表达式

来源:互联网 发布:钢结构预算软件 编辑:程序博客网 时间:2024/06/06 23:18

Ant编译项目时,他所依赖的其他的所有工程已经编译成功,但是它却编译失败,提示:

×××\sdk\tools\ant\build.xml 718:The following error occurred  while executing this line :

×××\sdk\tools\ant\build.xml 718:Compile failed; see the compiler error output for details;

如下图:



这个时候,不要慌,往上走看看他的提示, 1个错误 3个警告 ,警告一般就忽略了吧。

红色框内表示某个类中的第80行需要常量表达式  ,也许就是这里的错误,所以定位代码到这一行。

如下图:


这里将switch函数 换成if 就可以啦。switch caes后边只能跟常量

修改如下图:



只能表示好好码代码,多看书!:(


1 0
原创粉丝点击