0
votes

I'm going through Google's Java Quickstart page for google sheets but after going through the steps, and trying to run the sample code provided, I get these errors:

Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
    NetHttpTransport cannot be resolved to a type
    GoogleNetHttpTransport cannot be resolved
    Sheets cannot be resolved to a type
    Builder cannot be resolved to a type
    Sheets cannot be resolved to a type
    JsonFactory cannot be resolved to a type
    The method getValues() is undefined for the type ValueRange

    at SheetsQuickstart.main(SheetsQuickstart.java:66)

Any ideas on what might be causing it?

Here's the quickstart sheet I am following: https://developers.google.com/sheets/api/quickstart/java

1
Could provide the file where you put your dependencies? Probably you are using them in the wrong way - alberto vielma

1 Answers

0
votes

Check your imports. You need to import this package in order to solve this error and check the dependencies.

import com.google.api.client.http.javanet.NetHttpTransport;