Android studio reports an error when running the main() method

1.Error Content.
SourceSet with name ‘main’ not found
Solution.
In the gradle.xml file in the .idea folder add
<option name="delegatedBuild" value="false" />
2. Error reporting:
Command line is too long. Shorten command line for ServiceStarter or also for Application default configuration.
Solution:
In the workspace.xml file in the .idea folder, find the tag
<component name=”PropertiesComponent”>, add a line to the tag
<property name=”dynamic.classpath” value=”true” />


Read More: