好的,我正在 Intellij Idea 中使用 JDA 编写 Discord 机器人,并且使用 botCommons 进行嵌入。使用 Gradle 并导入 botCommons jar 文件。那是成功的。然而。我尝试启动机器人并在控制台中遇到此问题:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
> Could not find com.afollestad:ason:1.4.16.
Searched in the following locations:
- https://jcenter.bintray.com/com/afollestad/ason/1.4.16/ason-1.4.16.pom
- https://jcenter.bintray.com/com/afollestad/ason/1.4.16/ason-1.4.16.jar
- https://repo.maven.apache.org/maven2/com/afollestad/ason/1.4.16/ason-1.4.16.pom
- https://repo.maven.apache.org/maven2/com/afollestad/ason/1.4.16/ason-1.4.16.jar
- https://jitpack.io/com/afollestad/ason/1.4.16/ason-1.4.16.pom
- https://jitpack.io/com/afollestad/ason/1.4.16/ason-1.4.16.jar
Required by:
project :
project : > com.github.duncte123:botCommons:fbb8f98
我有我的 build.gradle 文件:
plugins {
id'java'
id'application'
id'com.github.johnrengelman.shadow' version '2.0.4'
}
mainClassName = 'me.ntmnathan.RoryMercury.Main'
version '1.0'
sourceCompatibility = 1.8
repositories {
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
compile group: 'net.dv8tion', name: 'JDA', version: '3.8.0_434'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
compile group: 'com.github.duncte123', name: 'botCommons', version: 'fbb8f98'
compile group: 'com.afollestad', name: 'ason', version: '1.4.16'
}
compileJava.options.encoding = 'UTF-8'
抱歉,我对 Java Discord 机器人开发有点陌生,但如果有任何帮助,我们将不胜感激。
慕村225694
至尊宝的传说
相关分类