close

[Solved] Check your module classpath for missing or conflicting dependencies

Hello Guys, How are you all? Hope You all Are Fine. Today I am facing the following error Check your module classpath for missing or conflicting dependencies in Java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Check your module classpath for missing or conflicting dependencies Error Occurs?

Today I am facing the following error Check your module classpath for missing or conflicting dependencies in Java.

How To Solve Check your module classpath for missing or conflicting dependencies Error ?

  1. How To Solve Check your module classpath for missing or conflicting dependencies Error ?

    To Solve Check your module classpath for missing or conflicting dependencies Error If your project is set with a JDK, then probably IDE (Intellij) does not have JDK set but your built application could run just fine with the required JVM.

  2. Check your module classpath for missing or conflicting dependencies

    To Solve Check your module classpath for missing or conflicting dependencies Error If your project is set with a JDK, then probably IDE (Intellij) does not have JDK set but your built application could run just fine with the required JVM.

Solution 1

If your project is set with a JDK, then probably IDE (Intellij) does not have JDK set but your built application could run just fine with the required JVM.

Solution 2

In our project we encountered this because we added the same directory to both production and the test sources.

sourceSets {
  main.java.srcDirs += 'src/main/kotlin/'
  main.java.srcDirs += 'build/generated/source/protos/main/java'
  test.java.srcDirs += 'src/test/kotlin/'
  test.java.srcDirs += 'build/generated/source/protos/main/java'
}

Removing the duplicate from the test sources fixed the problem.

sourceSets {
  main.java.srcDirs += 'src/main/kotlin/'
  main.java.srcDirs += 'build/generated/source/protos/main/java'
  test.java.srcDirs += 'src/test/kotlin/'
}

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read