错误提示:
FAILURE: Build failed with an exception.
* Where:
Initialization script 'C:\Users\j2019.zhu\AppData\Local\Temp\MyTest_main__.gradle' line: 21
* What went wrong:
A problem occurred configuring project ':app'.
> Could not create task ':app:MyTest.main()'.
> SourceSet with name 'main' not found.
* 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 1s
解决办法:
- 项目根目录下找到【.idea】目录下的【gradle.xml】文件
- 找到【delegatedBuild】选项并改为【false】
<GradleProjectSettings>
<option name="delegatedBuild" value="false"/>
如果没找到,则手动添加这一行
|