Skip to content

执行./gradlew build后编码错误  #19

@yangzidemuou

Description

@yangzidemuou

执行./gradlew build后编码错误
Task :compileJava
F:\code\halo-GPT\src\main\java\run\halo\starter\StarterPlugin.java:24: 错误: 编码 GBK 的不可映射字符 (0x81)
System.out.println("鎻掍欢鍚姩鎴愬姛锛?");
^
F:\code\halo-GPT\src\main\java\run\halo\starter\StarterPlugin.java:29: 错误: 编码 GBK 的不可映射字符 (0x81)
System.out.println("鎻掍欢鍋滄锛?");

在build.gradle中添加
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions