Solve the error reported by Android studio directly running java.main

When running java files directly in Android studio, the following error is reported:

solution:

Add the following
to. Idea.gradle.xml

Read More: