您的位置: 首页 > 文章 > AS运行main()方法报错:SourceSet with name ‘main‘ not found AS运行main()方法报错:SourceSet with name ‘main‘ not found 分类: 文章 • 2025-02-18 22:56:46 AS运行main()方法报错:SourceSet with name ‘main’ not found 记录一下在AS上运行Java文件的main()方法时报错,报错如下:解决方法:在.idea文件夹下的gradle.xml文件中添加<option name="delegatedBuild" value="false" />,然后重新运行就可以了