gradle踩坑 能正常启动,但是不能用mian方法

下午2:55:38: Executing task ‘Test1.main()’…

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.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 120ms
下午2:55:39: Task execution finished ‘Test1.main()’.

gradle踩坑 能正常启动,但是不能用mian方法_第1张图片

解决方式

	把下面两个配置改成idea就ok了

gradle踩坑 能正常启动,但是不能用mian方法_第2张图片

你可能感兴趣的:(Java,java,gradle,main)