java - 如何在 Eclipse 中从 rubenlagus 导入 Telegram Bot API
问题描述
我想开始使用 rubenlagus 的 Telegram Bots Api 5.2.0 对 Telegram Bot 进行编码,但我无法将它导入到我在 Eclipse 中的项目中。
https://github.com/rubenlagus/TelegramBots
我什至不知道 Maven 或 Gradle 是什么,所以我尝试了 4. 建议的选项来导入库,下载并导入了文件 'telegrambots-5.2.0-jar-with-dependencies' 但它不完整并且缺少以下内容类(也许更多,但那些是我尝试使用但找不到的):
org.telegram.telegrambots.bots.TelegramLongPollingBot
org.telegram.telegrambots.bots.TelegramWebhookBot
org.telegram.telegrambots.meta.TelegramBotsApi
那么我需要做什么才能使用 Eclipse 将整个库导入到我的项目中呢?
解决方案
使用Maven :- 尝试在pom.xml文件中导入 maven 依赖项
<dependency>
<groupId>org.telegram</groupId>
<artifactId>telegrambots</artifactId>
<version>5.2.0</version>
</dependency>
使用Gradle:-
implementation 'org.telegram:telegrambots:5.2.0'
推荐阅读
- excel - Excel 工作表中的重复名称 - (错误的公式)
- javascript - Gmail 将嵌入图像显示为 base64 字符串
- docker - Oracle 18c xe docker 映像无法启动
- python-3.x - 我的代码没有打印 MIXED 值,而逻辑是字母和数字的 ascii 值
- ios - 是否可以在 IOS 上从 Apple Wallet 访问交易?
- python - Python 3.9:IsoCalendarDate 数据的 unpickling 返回一个元组
- mongodb - 如何避免在使用 CQRS 的事件源、事件驱动架构中重复类型定义?
- sql - 安排雪花任务每月运行一次
- python - 如何提高 Python 中并行循环的效率
- flutter - Flutter:如何解析HTML属性中的“title”数据并在ListView中显示?