Cannot resolve symbol 'inject'

So I’m getting into plugin development, and in my first plugin I’m doing what the sponge documentation tells me to and have tried to maker a logger.

However, whenever I put @Inject I get an error saying “Cannot resolve symbol ‘inject’”

Please send help,
Moralous.

Your IDE probably suggests you to automatically import the class. Import the one from google’s package. Are you sure have written @Inject with the first letter upper case?

1 Like

Where do I get and how do I use google’s package?

It is a dependency of the SpongeAPI. So, when you have SpongeAPI as a dependency then you automatically have all dependencies of SpongeAPI.
Basically it is import com.google.inject.Inject.

dependencies {
compile ‘org.spongepowered:spongeapi:4.1.0’
}

That’s my dependencies thing, but my main class file still won’t import the com.google thing

Refreshed Gradle?