java - NetHttpTransport 无法解析为 Google api 实现类型
问题描述
我正在浏览谷歌表格的谷歌 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
解决方案
检查你的进口。您需要导入此包以解决此错误并检查依赖项。
导入 com.google.api.client.http.javanet.NetHttpTransport;
推荐阅读
- r - R中的garchFit函数:多元数据输入需要lhs的公式
- syntax-highlighting - 如何将 prism.js 连接到 textarea
- ethereum - 在我的项目中实现 ERC721 接口的问题
- php - Laravel belongsTo 关系返回null?
- python - Python 3.7:在 Windows 10 上安装 pycurl
- python - Zapier 给出错误:Python 脚本的“unicode”对象没有属性“copy”
- arrays - AppleScript 记录到 Swift 数组(或更好)的列表
- php - “JSON_ENCODE()”不适用于获取的数据 - PHP
- javascript - 焦点选择器组件反应原生
- video - 使用 ffmpeg 和批处理脚本将视频分成五个块