找不到main方法
问题描述:
- What went wrong:
A problem occurred configuring project ':app'.
Could not create task ':app:wo.main()'.
SourceSet with name 'main' not found.
解决:
方案一:run with coverage
方案二:在.idea下面的gradle.xml文件中 插入“ delegatedBuild” 这个属性配置,整体如下
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="delegatedBuild" value="false" />
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="" />
<option name="modules">
<set>
<option value="" />
<option value="/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>