In your android project, if you use Chinese in .java directly (such as textView.setText("中文")), and then build the project within Android source code with commands:
$ cd $android_src_dir
$ . ./build/envsetup.sh
$ cd $your_android_project_dir
$ mm
the Chinese can't be shown correctly.
The reason is that the flag '-encoding assci' is applied when to build .java with javac in Android 2.3.
Solution:
Replace the flag with '-encoding utf-8'
阅读(869) | 评论(0) | 转发(0) |