让Gradle支持中文 -- 关于 "编码 GBK 的不可映射字符"错误的解决
Leon.Wood
2012-11-02
今天用gradle编译一个已有项目 结果爆粗
"警告:编码 GBK 的不可映射字符" 原因是因为代码中中文注释的缘故,只需按如下方式设置编码即可 //编译groovy代码时采用 UTF-8 tasks.withType(GroovyCompile) { groovyOptions.encoding = "MacRoman" } //编译JAVA文件时采用UTF-8 tasks.withType(Compile) { options.encoding = "UTF-8" } |
|
sczhui
2012-12-17
tasks.withType(Compile) {
options.encoding = 'UTF-8' } tasks.withType(GroovyCompile) { groovyOptions.encoding = 'MacRoman' } 已加入上述代码,编译仍提示 AbstractRequestDto.java:2: 警告:编码 GBK 的不可映射字符 * 鏂?浠?鍚? AbstractRequestDto.java ^ |
相关讨论
相关资源推荐
- HOW POWERFUL ARE GRAPH NEURAL NETWORKS?
- 现代大学英语精读第二版(第五册)学习笔记(原文及全文翻译)——1 - Who Are you and what are you doing here?(你们是谁?来这儿做什么?)
- Topic 1 How Much Do You Know About Chinese Culture? qa
- How the Rich Got Rich
- How to keep building your vocabulary?
- Are You a Software Architect?
- how does RemoteFX works?
- How To Become Rich By Making Others Rich
- Part Ⅱ At the Restaurant 在饭店??
- How to find our career ideal?