项目本来是在windows下,转到MAC开发后,ant编译出现这个错误。
Buildfile: /Users/mac/Documents/luzaimou/bussiness/meinvjiqi/build.xml
init:
[echo] start initing ...
[echo] finish initing.
main:
[echo] generating R.java for project to dir gen (using aapt) ...
[echo] generating R.java for library to dir gen (using aapt) ...
[echo] compiling java files to class files (include R.java, library and the third-party jars) ...
[javac] Compiling 22 source files to /Users/mac/Documents/luzaimou/bussiness/meinvjiqi/bin/classes
[javac] /Users/mac/Documents/luzaimou/bussiness/meinvjiqi/src/com/speakit/tts/engine/CallBackSynthesize.java:1: illegal character: \65279
[javac] ?package com.speakit.tts.engine;
[javac] ^
[javac] /Users/mac/Documents/luzaimou/bussiness/meinvjiqi/src/com/speakit/tts/engine/CallBackText.java:1: illegal character: \65279
[javac] ?package com.speakit.tts.engine;
[javac] ^
[javac] /Users/mac/Documents/luzaimou/bussiness/meinvjiqi/src/com/speakit/tts/engine/ITTSInputTextProc.java:1: illegal character: \65279
[javac] ?package com.speakit.tts.engine;
[javac] ^
解决办法:用16位文本编辑器0xED来去掉各个java前的三个字节,他们的值是65279,我们不需要。