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了

作者:冲锋的麦克

出处:https://www.cnblogs.com/zhangwenju/p/14240890.html

版权:本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。

posted @   冲锋的麦克  阅读(327)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 记一次.NET内存居高不下排查解决与启示
more_horiz
keyboard_arrow_up light_mode palette
选择主题
点击右上角即可分享
微信分享提示