更新时间:2023-09-11 21:05:52
的的file.encoding
系统属性需要设置权当JVM执行摇篮建设(如在摇篮守护进程)启动。实现这一目标的方法之一是使用出口GRADLE_OPTS = - 指定-Dfile.encoding = UTF-8
。可能工作的另一种方法是添加 systemProp.file.encoding = UTF-8
到 gradle.properties
。当然,这个假设构建脚本文件实际上使用UTF-8编码。要查看你的平台的(因此摇篮的)的默认编码,打印出系统属性的值在构建脚本。
The file.encoding
system property needs to be set right when the JVM executing the Gradle build (e.g. the Gradle Daemon) starts up. One way to achieve this is with export GRADLE_OPTS="-Dfile.encoding=utf-8"
. Another way that might work is to add systemProp.file.encoding=utf-8
to gradle.properties
. Of course this assumes that the build script files are actually using utf-8 encoding. To see what your platform's (and therefore Gradle's) default encoding is, print out the system property's value in a build script.