After upgrading to Gradle 2.0: Could not find property 'Compile' on root project

前端 未结 3 1830
刺人心
刺人心 2021-02-01 01:03

To avoid warnings regarding special characters when building my Java source code, I put this line in my gradle.build which worked fine before upgrading to Gradle 2.

3条回答
  •  甜味超标
    2021-02-01 01:36

    Changing the line to

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

    fixed the issue.

提交回复
热议问题