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後邊只能跟常量
修改如下圖:
只能表示好好碼代碼,多看書!:(