android - android-gradle无法创建 'AppPlugin'类型的插件

标签 android gradle

我正在尝试运行我的应用程序,但出现了一些错误。
虽然我用以下方式修复了jcenter()

maven {
        url "https://jcenter.bintray.com"
    }

我现在有这个:

任务':app:dexDebug'的执行失败。 com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'command'/ usr / lib / jvm / java-8-oracle / bin / java''完成且非零退出值(value)2

运行gradle --stacktrace androidDependencies:
* What went wrong A problem occurred evaluating project ':app' > Could not create plugin of type 'AppPlugin'.

这些是一般gradle的依赖项:
dependencies {
        classpath 'com.android.tools.build:gradle:1.0.0'
    }

这些是我的应用gradle文件中的文件:
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile files('libs/android-support-v4.jar')
}

最佳答案

我终于解决了这个问题;它涉及环境和IDE插件之间的Gradle版本兼容性,在我的情况下是Android Studio。

该表绝对有用:http://tools.android.com/tech-docs/new-build-system/version-compatibility

所以,因为我的插件是1.0.0,所以我将表中提到的1.4 Gradle版本升级到2.3,一切正常

关于android - android-gradle无法创建 'AppPlugin'类型的插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28925855/

相关文章:

gradle - 无法从 jar 中排除依赖关系

android - 资源已经定义 gradle Android studio

android - 指定S3 Maven存储库时,Gradle构建因 “host name may not be empty”而失败

android - Fedora 64 位中的 Android 模拟器使用哪个 libGL?

android - Gradle maven-publish 插件生成没有依赖项的 pom

android - Twilio 调用在 iOS 和 Android 中不起作用

gradle - 在buildscript闭包中访问项目的额外属性

android - 9 补丁图像阻止应用程序在 Android 中运行

android - 如何让 PixlUI for Android 自定义字体正常工作?

android - Android Studio将无法正确执行gradle构建