Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: scalac: error while loading package, Scala signature package has wrong version; expected 5.0, found 5.2 in package.class

I have a java & scala project that I am updating jars for.

I swapped out akka-camel_2.11.jar and replaced it with jar akka-camel_2.13-2.5.25.jar, and now I see the error shown in the title when attempting to build in Intellij.

What is the scala signature? What is package.class? And how might I edit these so that my project can build using this updated jar?

like image 500
mherzl Avatar asked Sep 26 '19 20:09

mherzl


1 Answers

When you have multiple versions of dependencies of same SDK it show this error I too faced this issue. my scala project had the following dependencies
org.scala-lang:scala-library.2.11.0 [as well as] org.scala-lang:scala-library.2.7.0

so this caused the confusion with the signature.

remove one of the added library . in intellij idea files -> project structure -> library tab -> scroll and search for the extra added library -> press the '-' icon at top left side of the dialog box.

like image 55
Andrew Tucker Avatar answered Sep 17 '22 02:09

Andrew Tucker