【问题标题】:"Classpath is incomplete" warning still appear even though a build.gradle exist即使 build.gradle 存在,“类路径不完整”警告仍然出现
【发布时间】:2017-11-10 04:15:34
【问题描述】:

据我了解here,如果我打开一个包含 build.gradle 文件的文件夹,则不会出现“类路径不完整”警告。

就我而言,我有一个 build.gradle 文件,但仍然会出现弹出窗口。

这是我的 build.gradle

apply plugin: 'java'
apply plugin: 'application'

mainClassName = 'hello.HelloWorld'

repositories {
    mavenCentral()
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
    compile "joda-time:joda-time:2.2"
    testCompile "junit:junit:4.12"
}

jar {
    baseName = 'gs-gradle'
    version = '0.1.0'
}

我错过了什么吗?

请多多包涵,这是我第一次使用 Gradle。

谢谢!

【问题讨论】:

    标签: java spring gradle visual-studio-code


    【解决方案1】:

    我有同样的问题,并通过将以下内容添加到我的 build.gradle 来修复它:

    apply plugin: 'eclipse'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-06-12
      • 1970-01-01
      • 2012-01-18
      • 2012-12-07
      • 2011-08-25
      • 2018-04-01
      • 2017-01-31
      • 1970-01-01
      相关资源
      最近更新 更多