设置文件编码:

设置输出编码:

-Dstdout.encoding=UTF-8
-Dstderr.encoding=UTF-8
-Dfile.encoding=UTF-8
-Dconsole.encoding=UTF-8
项目根目录下的 gradle.properties 配置:

org.gradle.jvmargs=-Dfile.encoding=UTF-8
Windows 11 还需要做如下设置:

https://hefengbao.github.io/hw/devops/env/ide/android-studio/