我在intellij上創建了一個樣本gradle項目。Gradle構建投擲錯誤
我去到項目的根文件夾,並執行以下命令:
./gradlew installDist
我收到此錯誤:
FAILURE: Build failed with an exception.
What went wrong: Task 'installDist' not found in root project 'HelloWorld'.
Try: Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
請請讓我知道這個分辨率。我花了一個小時就沒有解決。
你爲什麼認爲你的樣例項目中有'installDist'任務?例外說沒有這樣的任務。嘗試運行'gradlew tasks'列出所有任務。或者,如果你想,它應該在那裏,然後張貼整個腳本 – Stanislav