【问题标题】:build.gradle error. Sorry couldnt put error here look in the bodybuild.gradle 错误。抱歉不能把错误放在这里看正文
【发布时间】:2020-04-14 08:27:39
【问题描述】:

我正在关注网站“https://medium.com/discord-bots/making-a-basic-discord-bot-with-java-834949008c2b”上的教程,我收到错误Receiver class com.github.jengelman.gradle.plugins.shadow.internal.DependencyFileCollection 没有定义或继承已解决的实现接口org.gradle.api.Buildable的方法'abstract org.gradle.api.tasks.TaskDependency getBuildDependencies()'。

这是我的 build.gradle 代码。

plugins {
    id 'java'
    id 'application'
    id 'com.github.johnrengelman.shadow' version'2.0.1'
}
mainClassName = "Main"

group 'BlueBot'
version '1.0-SNAPSHOT'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
    jcenter()
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.12'
    compile 'net.dv8tion:JDA:4.0.0_62'
}

如果您有任何需要解决的问题或需要任何其他信息,请告诉我。

感谢您的宝贵时间。

【问题讨论】:

    标签: java gradle discord


    【解决方案1】:

    您需要更新影子版本

    id 'com.github.johnrengelman.shadow' version'5.2.0'
    

    你可以在GitHub找到最新版本

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-10-14
      • 1970-01-01
      • 2018-03-21
      • 1970-01-01
      • 2014-05-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多