代码中的中文注释可能会引起Gradle报错
解决办法:
在项目下的build.gradle下添加以下代码即可解决
[java] view plaincopyprint?
- tasks.withType(Compile) {
- options.encoding = "UTF-8"
- }
Gradle2.0+环境下需将Compile改为JavaCompile
[java] view plaincopyprint?
- tasks.withType(JavaCompile) {
- options.encoding = "UTF-8"
- }
感谢feiniaowuhen 君的技术支持