Android studio System.out 中文乱码

>今天在做一个线程方面的总结,突然发现 System.out.print中文会乱码,如下图

>

这是因为在Gradle中没有配置,在对应的module的gradle中添加如下配置代码:

```

tasks.withType(JavaCompile) {
    options.encoding = "UTF-8"
}

```

猜你喜欢

转载自blog.csdn.net/hello_12413/article/details/84313451