美文网首页Android知识
Error:Unable to find method 'com

Error:Unable to find method 'com

作者: Android扫地僧 | 来源:发表于2017-12-04 10:18 被阅读0次

    Android studio升级3.0后与ButterKnife兼容性报错

    Error:Unable to find method 'com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List;'.
    Possible causes for this unexpected error include:
    Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
    [Re-download dependencies and sync project (requires network)](http://www.jianshu.com/syncProject)
    The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
    [Stop Gradle build processes (requires restart)](http://www.jianshu.com/stopGradleDaemons)
    Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
    In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
    

    两种解决办法:

    1. 升级ButterKnife到9.0.0-SNAPSHOT

    buildscript {
        repositories {
        google()
        jcenter()
        maven {url"https://oss.sonatype.org/content/repositories/snapshots"}
    }
    dependencies {
        classpath'com.android.tools.build:gradle:3.0.0'
        classpath'com.jakewharton:butterknife-gradle-plugin:9.0.0-SNAPSHOT'
    }
    
    1. 降级ButterKnife到8.4.0

    GitHub Issue链接https://github.com/JakeWharton/butterknife/issues/963

    相关文章

      网友评论

        本文标题:Error:Unable to find method 'com

        本文链接:https://www.haomeiwen.com/subject/jzptixtx.html