Reputation: 2612
Creating a Java application for Google Appengine that needs to use Google Calendar api.
I'm following the example https://developers.google.com/google-apps/calendar/quickstart/java
I've added the dependecies in the correct build.gradle file as stated in the example I even tried to force redownload the dependencies using gradle build --refresh-dependencies
But where I try to import the classes, I get the error
'cannot resolve symbol calendar'
Where I do the import statements
import com.google.api.services.calendar.CalendarScopes;
import com.google.api.services.calendar.model.*;
Was there a change without an update of the example? Wrong dependency?
Also when I alt+enter in IntelliJ on the lines that need the import, I don't get a suggestion what the correct import should be. Only the default create class stuff, which suggests it can't find the correct import to begin with.
UPDATE: I updated the dependency line to a newer version:
compile 'com.google.apis:google-api-services-calendar:v3-rev145-1.20.0'
instead of the one from example:
compile 'com.google.apis:google-api-services-calendar:v3-rev125-1.20.0'
=> No change in behaviour
Upvotes: 1
Views: 1170
Reputation: 5227
If you can build your project with gradle it is likely that IntelliJ is just not aware of the gradle nature / dependencies.
Try to make IntelliJ understand that you're using Gradle by:
Upvotes: 2