【问题标题】:How do I import the Telegram Bot API from rubenlagus in Eclipse如何在 Eclipse 中从 rubenlagus 导入 Telegram Bot API
【发布时间】:2021-08-10 03:08:12
【问题描述】:

我想开始使用 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 将整个库导入到我的项目中?

【问题讨论】:

    标签: java eclipse telegram telegram-bot


    【解决方案1】:

    使用 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'
    

    【讨论】:

      猜你喜欢
      • 2018-04-07
      • 2021-06-19
      • 1970-01-01
      • 2020-09-15
      • 2022-01-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多