【问题标题】:Plugin with id Android not found未找到 ID 为 Android 的插件
【发布时间】:2014-12-07 19:58:24
【问题描述】:

jenkins 新手,正在运行我的第一个构建。我正在使用 gradle 进行构建,但不断收到以下错误

FAILURE: Build failed with an exception.
* Where:
Build file '/Test/build.gradle' `line: 1'
* What went wrong:
A problem occurred evaluating root project 'ComitTest'.
> Failed to apply plugin [id 'android']
> Plugin with id 'android' not found.

我已经搜索了将近 2 天,并尝试安装其他 android 插件,但似乎无法解决此问题。

我已经在 jenkins 上设置了全局属性下的 ANDROID_HOME 变量。确保路径正确。

任何帮助将不胜感激。提前致谢

【问题讨论】:

  • 你能发布你所有的“build.gradle”文件和项目的目录吗?谢谢。

标签: android jenkins android-gradle-plugin


【解决方案1】:

我已通过在 bundle.gradle 文件顶部添加以下代码来修复它

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.7.+'
    }
}

感谢您的帮助:)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-01-02
    • 1970-01-01
    • 2017-01-20
    • 2014-08-03
    • 1970-01-01
    • 1970-01-01
    • 2014-08-09
    相关资源
    最近更新 更多