问题现象:

Task 'run' not found in root project 'springframework'.

Task ‘run’ not found in root project

问题原因:

     没有在gradle.build文件中添加如下配置,

mainClassName  是 application 的一个属性,需要一起使用。
apply plugin: 'application'
mainClassName = 'hello.HelloWorld'

 

类似问题:

https://discuss.gradle.org/t/task-run-not-found-in-root-project/12130

I figured it out: my gradle.build did not have the line

apply plugin: 'application'

相关文章:

  • 2021-07-02
  • 2021-10-23
  • 2021-12-23
  • 2021-10-31
  • 2021-05-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-30
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2021-05-14
  • 2021-12-12
  • 2022-12-23
相关资源
相似解决方案