开发者

How do I modify the -encoding argument to javac in the Android Ant build system

Apologies if this is a stupid question - I'm an Android and Ant newbie.

I have utf8 encoded source files that I need to compile with the Android Ant build system. By default, the encoding is set to ascii. I'd be very grateful for a pointer to whatever I need to do to let the build system know that my files are utf8.

Incidentally, it works fine开发者_运维技巧 if I build in Eclipse, but I need to build from the command line.

Thanks!


You should add java.encoding=UTF-8 to build.properties


Take a look at android-sdk-windows\platforms[your-platform]\ant\ant_rules_r2.xml. You can find

<javac encoding="ascii" ...

line there and I guess you can change it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜