Paul Butcher
Paul Butcher

Reputation: 10852

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!

Upvotes: 3

Views: 2095

Answers (2)

Alexander Kosenkov
Alexander Kosenkov

Reputation: 1595

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

Upvotes: 2

Fedor
Fedor

Reputation: 43412

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.

Upvotes: -1

Related Questions