0

This is a really crazy problem. On my team there are 4 developers and I'm the only with this problem.

I have a multi-module Scala sbt project, that I load with Idea. If on my code I do an import like import recommender.commons.model.RecommendationSet, Idea will tell me Cannot resolve symbol commons, but if I do import _root_.recommender.commons.model.RecommendationSet Idea understands the code. If I run the code directly with sbt, all the versions work without problem.

I have already deleted the .idea, target, ~/.ivy, ~/.activator, ~/.java, ~/.sbt and reimported the project multiple times.

I have new versions of Scala, Idea and sbt.

I'm getting crazy, I really need help. My only idea is to format the disk.

moem
  • 556
  • 3
  • 10
oleber
  • 1,089
  • 4
  • 12
  • 25

1 Answers1

0

The _root_ prefix is a way of specifying an absolute import. When IntelliJ requires it, it typically indicates a problem in resolving the files correctly (e.g. due to ambiguity). You should check if your source roots are set up correctly.

Community
  • 1
  • 1
moem
  • 556
  • 3
  • 10