Android: getting rid of "warning: unmanaged character for ascii encoding"

I compile using android tools without eclipse .

I compile running "ant debug" from the command line.

I found many rules on the Internet on how to remove with an annoying warning, but I could not get them to work.

I tried the -D option, I tried randomly setting up build files. *, I tried to export the environment variable ... nothing.

I think some of these methods just don't work, and some others will work, but I'm doing them wrong. Anything is possible, and I can't stand it anymore: any tips on how to do this?

+3
source share
4 answers

I had the same problem. Here's how I solved it:

When I run ant release, the output is this line: [setup] Importing rules file: tools/ant/ant_rules_r3.xml. I edited ant_rules_r3.xmland replaced "ascii" with "UTF8".

+3
source

I have an android-10 SDK, this is how I fixed the coding warning when creating the project. * create file c: /myproject/build.properties * override ANT default variables

## Override default ANT properties
java.encoding=ISO-8859-1
+1
source

, , , Android SDK, ANT. ANT . , , , . .

ANT . , , , , .

ANT 1.8.4 build.properties, , , . ant.properties ( ) , .

, local.properties build.xml. android.

build.xml, Android ANT.

- ANT build script, android-sdk/tools/ant/build.xml. , :

java.target=1.6
verbose=true

But the encoding is set in the same way as previously suggested by someone:

## Override default ANT properties
java.encoding=ISO-8859-1
+1
source

For the Swedish character set, I did it like fhucho. But I had to use ISO-8859-1 instead of UTF-8. Therefore, it might be better to use ISO encodings.

0
source

Source: https://habr.com/ru/post/1740772/


All Articles