Android Studio编译时Gradle报乱码

Android Studio编译时Gradle报乱码_第1张图片


</pre><pre name="code" class="java">首先在设置中设置字符集
Settings->File Encodings->IDE Encodeing->UTF-8
Settings->File Encodings->Project Encodeing->UTF-8
然后在对应的module下的build.gradle里加入下面的配置
//gradle:1.0
tasks.withType(Compile) {  
    options.encoding = "UTF-8" 
}
//gradle:2.0
tasks.withType(JavaCompile) {  
    options.encoding = "UTF-8" 
}









你可能感兴趣的:(android,问题,Studio)