【问题标题】:gradle dependencyUpdates failuregradle 依赖更新失败
【发布时间】:2018-11-14 19:30:16
【问题描述】:

我已经“安装”或包含了 ben manes - gradle 版本插件:

https://github.com/ben-manes/gradle-versions-plugin

下面的代码是build.gradle(项目:奖励)

应用插件:“com.github.ben-manes.versions”

buildscript {
    ext.kotlin_version = '1.3.10'
    repositories {
        google()
        jcenter()
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "com.github.ben-manes:gradle-versions-plugin:0.20.0"
    }
}

当我尝试运行以下 gradle 任务时:gradle dependencyUpdates.

我得到以下信息:

FAILURE: Build failed with an exception.
 What went wrong:
Task 'gradle' not found in project ':app'. Some candidates are: 'bundle'.
 Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
 Get more help at https://help.gradle.org
BUILD FAILED in 0s
11:23:53: Tasks execution finished 'gradle dependencyUpdates'.

【问题讨论】:

    标签: gradle android-gradle-plugin dependencies


    【解决方案1】:

    经过进一步测试,我意识到我需要运行的任务前面不应该有gradle这个词。命令行指令应该只是 dependencyUpdates。然后单击确定,它将导出报告。

    【讨论】:

      猜你喜欢
      • 2014-09-17
      • 1970-01-01
      • 2020-07-01
      • 2018-10-15
      • 2017-01-28
      • 2016-04-22
      • 2018-03-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多