LoginSignup
8
2

More than 5 years have passed since last update.

「Cannot add task 'wrapper' as a task with that name already exists.」が出た

Last updated at Posted at 2019-05-02

原因

使用しているGradleのバージョンが5.X(5系)の場合、以下の「task wrapper」の記述は使えない。

task wrapper(type: Wrapper) {
    gradleVersion = '4.4'
    distributionUrl = distributionUrl.replace("bin", "all")
}

対応

「task wrapper」 → 「wapper」に記述を修正したら正常に動いた。
↓こんな感じ。

wrapper {
    gradleVersion = '4.4'
    distributionUrl = distributionUrl.replace("bin", "all")
}
8
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
2