gpt4 book ai didi

java - 安装web3j时无法编码的字符无法编码

转载 作者:行者123 更新时间:2023-12-03 05:49:42 26 4
gpt4 key购买 nike

我已经从git仓库下载了Etherium客户端Java库 web3j 。当我尝试编译源代码时,它会失败,因为某些源文件是使用UTF-8编码创建的,但是gradle采用了我的操作系统默认编码(Cp1250)。

C:\web3j\web3j-master>gradlew install

> Task :crypto:javadoc FAILED
C:\web3j\web3j-master\crypto\src\main\java\org\web3j\crypto\Sign.java:102: error: unmappable character for encoding Cp1250
// routine specified in Section 2.3.7, where mlen = Ôî?(log2 p)/8Ôîë or mlen = Ôî?m/8Ôîë.
^
C:\web3j\web3j-master\crypto\src\main\java\org\web3j\crypto\Sign.java:102: error: unmappable character for encoding Cp1250
// routine specified in Section 2.3.7, where mlen = Ôî?(log2 p)/8Ôîë or mlen = Ôî?m/8Ôîë.

^
2 errors

如何强制gradle采用UTF-8编码而不是操作系统默认编码?

最佳答案

apply plugin: "java"
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}

关于java - 安装web3j时无法编码的字符无法编码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48486809/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com