Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 20516

Error: Could not find or load main class

$
0
0

Your build.gradle file belongs in the root of the project, not in the src/main directory. Your file structure for the project should be:

/build.gradle
/src/main/java/ApiExample.java

The Java plugin is going to look for the src in src/main/java relative to the project, so your stated structure would cause the ApiExample.java file to not be compiled or available. Therefore, ClassNotFoundException.


Viewing all articles
Browse latest Browse all 20516

Latest Images

Trending Articles



Latest Images