1

i'am having an issue with my project every time i'm trying to run it the error Plugin with id 'com.jakewharton.butterknife' not found. shows up can someone tell me whats going on with this code ?? i'am stuck and any help is appreciated here is the gradle

 apply plugin: 'com.android.library'
    apply plugin: 'com.jakewharton.butterknife'
    android {
        compileSdkVersion 27
        buildToolsVersion '27.0.3'
        flavorDimensions "default"
        defaultConfig {
            minSdkVersion 15
            targetSdkVersion 27

            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
dependencies {
   final SUPPORT_LIB_VERSION = '27.0.2'
    final COLOR_PICKER_VERSION = '1.5'
    final BUTTER_KNIFE_VERSION = '8.8.1'

    compile fileTree(dir: 'libs', include: ['*.jar'])

    compile 'com.google.android.gms:play-services-ads:11.8.0'
    //noinspection GradleCompatible
    compile "com.android.support:appcompat-v7:27.0.2"
    compile "com.larswerkman:HoloColorPicker:1.5"
    compile 'com.jakewharton:butterknife:8.8.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    compile project(':library')
}

buildscript {
    repositories {
        google()
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath 'com.google.gms:google-services:3.1.1'
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
    }
}

allprojects {
    repositories {
        google()
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

the project gradle

1 Answers1

2

I think you need to use SNAPSHOT for Android Studio 3.0 and above or downgrade your ButterKnife to 8.4.0: annotationProcessor, library and plugin which also works. Tested.

Yupi
  • 4,402
  • 3
  • 18
  • 37
  • thanks it works all what i have to do right now is change '@bind' with '@bindView' –  Feb 01 '18 at 12:11
  • `@Bind` is replaced with `@BindView` in `ButterKnife 8.0.0` and above if you previous used one of the old versions like `7.*` then you need to replace `@Bind` with `@BindView` but if you didn't all remains same. Here are the differences: https://stackoverflow.com/questions/37662171/what-is-the-difference-between-bind-and-bindview-in-butterknife – Yupi Feb 01 '18 at 12:15