摇篮是发出错误"无法创建类型的插件“AppPlugin'" [英] Gradle is issuing an error "Could not create plugin of type 'AppPlugin'"

查看:368
本文介绍了摇篮是发出错误"无法创建类型的插件“AppPlugin'"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图创建摇篮一个简单的Andr​​oid项目。我在一台计算机的Debian GNU / Linux的7'喘息'。

我跟着<一的recomendations href="http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Differences-between-a-Project-and-a-Library-Project">Gradle插件用户指南 - Android的工具项目网站,但它蒙上了错误:

 失败:建立失败,一个例外。

* 哪里:
构建文件'/home/alex/Proyectos/MyLogin/build.gradle'行:11

* 什么地方出了错:
发生评估根项目的问题MyLogin。
&GT;无法创建类型的插件AppPlugin。

* 尝试:
与--stacktrace选项获取堆栈跟踪运行。与--info或--debug选项运行,以获得更多的日志输出。

构建失败

总时间:4.817秒
 

我也跟着说明:

  • 在摇篮1.9
  • 插件0.7
  • 在SDK 17+(实际上是19)

我还启动了一个项目再起,我发现结果是由命令发出摇篮任务所示的文件中。

我也试过摇篮1.10,但结果是一样的。

即使这个问题不是有用,因为它与升级到解决摇篮1.6(据我所知,插件0.7至少需要摇篮1.9)。

我有同样的错误在失败后尝试这个机器人工作室的IntelliJ IDEA

编辑:我也试过用新的项目在这两个集成开发环境,并得到了相同的问题。但最让我惊讶的是,双方的IDE在其包装形式使用摇篮1.8。我试图cinfigure他们都用我的本地摇篮安装,但还是同样的问题。

我是什么做错了吗?是不是一个错误?如何避免这一问题?

请帮我。

编辑:这是我的 build.gradle

  buildscript {
    库{
        mavenCentral()
    }
    依赖{
        类路径com.android.tools.build:gradle:0.7.+
    }
}

应用插件:'机器人'

库{
    mavenCentral()
}

安卓{
    compileSdkVersion 14
    buildToolsVersion '19 .0.1

    defaultConfig {
        的minSdkVersion 14
        targetSdkVersion 19
    }
}

sourceCompatibility = 1.6

版本='0.1'

依赖{
    编译com.android.support:support-v4:18.0.0
    //编制项目(:核心)
}
 

解决方案

谷歌做的的摇篮插件

  

注:0.7.2要求java7目录。这是一个错误。用0.7.3代替。

版本0.7.3重新启用的Java6支持。在我的构建文件声明摇篮0.7.3确实解决这对我来说。

没有人是完美的:)

<一个href="http://tools.android.com/tech-docs/new-build-system">http://tools.android.com/tech-docs/new-build-system

I'm trying to create a simple android project with gradle. I work in a computer with Debian GNU/Linux 7 'wheezy'.

I followed the recomendations in Gradle Plugin User Guide - Android Tools Project Site, but it casts an error:

FAILURE: Build failed with an exception.

* Where:
Build file '/home/alex/Proyectos/MyLogin/build.gradle' line: 11

* What went wrong:
A problem occurred evaluating root project 'MyLogin'.
> Could not create plugin of type 'AppPlugin'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 4.817 secs

I followed the specifications:

  • Gradle 1.9
  • Plugin 0.7
  • SDK 17+ (actually 19)

I also started a project anew, and the results I showed were issued by the command gradle tasks as shown in the documentation.

I also tried gradle 1.10, but the result is the same.

Even this question was not usefull, since it solved with 'upgrading' to gradle 1.6 (I understand that plugin 0.7 requires at least gradle 1.9).

I tried this after failing with the same error in android-studio and IntelliJ Idea.

EDIT: I also tried with new projects in both IDEs, and got the same issue. But what most surprises me is that both IDEs use gradle 1.8 in their wrapped form. I tried to cinfigure both of them to use my local gradle install, but still the same issue.

What am I doing wrong? Is it a bug? How can I avoid the problem?

Please, help me.

EDIT: Here is my build.gradle

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

apply plugin: 'android'

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 14
    buildToolsVersion '19.0.1'

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 19
    }
}

sourceCompatibility = 1.6

version = '0.1'

dependencies {
    compile 'com.android.support:support-v4:18.0.0'
    //compile project(':core')
}

解决方案

Google made a mistake with version 0.7.2 of the Gradle plugin:

Note: 0.7.2 requires Java7. This is a mistake. Use 0.7.3 instead.

Release 0.7.3 re-enables Java6 support. Declaring Gradle 0.7.3 in my build files does indeed resolve this for me.

No one is perfect :)

http://tools.android.com/tech-docs/new-build-system

这篇关于摇篮是发出错误&QUOT;无法创建类型的插件“AppPlugin'&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆