gpt4 book ai didi

java - NetHttpTransport 无法解析为 Google api 实现类型

转载 作者:行者123 更新时间:2023-12-01 19:22:57 26 4
gpt4 key购买 nike

我正在浏览 Google 的 Google 表格的 Java 快速入门页面,但在完成这些步骤并尝试运行提供的示例代码后,我收到以下错误:

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)

有什么想法可能导致它吗?

这是我正在遵循的快速入门表: https://developers.google.com/sheets/api/quickstart/java

最佳答案

检查您的导入。您需要导入此包才能解决此错误并检查依赖关系。

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

关于java - NetHttpTransport 无法解析为 Google api 实现类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59340541/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com