简体   繁体   中英

Scala Sbt tool conflicting methods with Java runtime

Getting a java.lang.IncompatibleClassChangeError: conflicting default methods for 'newBuilder()Lscala/collection/mutable/Builder;' in scala/collection/immutable/DefaultMap from classes [scala/collection/MapLike, scala/collection/generic/GenericTraversableTemplate]

with the latest version of Scala and sbt with Java 8 on Ubuntu 16.04

I upgraded to Java 9 as in this link https://medium.com/@shaaslam/how-to-install-oracle-java-9-in-ubuntu-16-04-671e598f0116 and Sbt started running successfully, but Java 9 didn't work as it couldn't download the Log4j dependency so I ran:

sudo update-alternatives --config java
sudo update-alternatives --config javac

and switched back to 8

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM