Neilos Neilos - 1 year ago 94
Scala Question

Scala import not working - object Database is not a member of package

I have an issue when trying to import in scala. The object

exists under
but when I try to import it:


I get the error:

object Database is not a member of package

Any ideas what the problem is?


It is worth mentioning that the import is in the file Application.scala under the package
, I can't figure out why it would append the import to the current package though, weird...

Edit 2:

So using:


Does work as mentioned below. But should it work without the
? The comments so far seem to indicate that it should.


So it turns out that I just needed to clean the project for the import to work properly, using both:



are valid solutions. Eclipse had just gotten confused.

Answer Source

imports can be relative. Is that the only import you have? be careful with other imports like


ultimately, this should fix it, then you can try to find more about it:


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download