0

I am learning Gin with GinTutorial and I've stacked on silly problem.

In bind(MyWidgetMainPanel.class).in(Singleton.class); Singleton does not exist.

I've already tried the following:

import com.google.gwt.inject.client.AbstractGinModule; import com.google.gwt.inject.client.Singleton; import com.google.gwt.inject.Singleton;

IDE shows that Singleton does not exist before compilation time.

If I try to use import com.google.inject.Singleton; it shows that Singleton does not exist on compilation.

  • gin-2.1.2
  • gwt2.6

I'd be happy to have any of your ideas or explanations.

2 Answers2

1

I am not sure this is the solution, but when I use injection like this with GIN in GWT, I do not import com.google.gwt.inject.Singleton in my GinModule, but com.google.inject.Singleton and it works. I hope it helps.

ovie
  • 621
  • 3
  • 20
0

Finally I've found that it is not enough to add gin-2.1.2.jar to classpath. It requires guice-3.0.jar.