天天看点

Cannot add task 'wrapper' as a task with that name already exists

task wrapper(type: Wrapper) {
    gradleVersion = '4.4'    
    distributionUrl = distributionUrl.replace("bin", "all")
}                改成如下      
wrapper {
    gradleVersion = '4.4'
    distributionUrl = distributionUrl.replace("bin", "all")
}                这是由于使用gradle版本5.x导致的
      

参考:https://stackoverflow.com/questions/53709282/cannot-add-task-wrapper-as-a-task-with-that-name-already-exists

继续阅读