Loading

idea项目 能正常启动 但是不能用mian方法

开发工具:idea
构建方式:gradle

报错如下:

FAILURE: Build failed with an exception.

Where:
Initialization script ‘/private/var/folders/2w/tt1p_4td3yq9xlbl7c2t4jn00000gn/T/Test1_main__.gradle’ line: 18

What went wrong:
A problem occurred configuring root project ‘demo10’.

Could not create task ‘:Test1.main()’.
Unnecessarily replacing a task that does not exist is not supported. Use create() or register() directly instead. You attempted to replace a task named ‘Test1.main()’, but there is no existing task with that name.

image.png
解决方式
image.png
两个配置改成idea就ok了

posted @ 2021-01-06 14:23  冲锋的麦克  阅读(309)  评论(0编辑  收藏  举报