Butterknife 8.4.0 - Plugin with id 'android-apt' not found
Asked Answered
S

3

7

I keep getting the error Plugin with id 'android-apt' not found. What's going wrong here?

plugins {
    id "me.tatarka.retrolambda" version "3.2.5"
}

apply plugin: 'com.android.application'
apply plugin: 'android-apt'

android {
    compileSdkVersion 24
    buildToolsVersion '23.0.3'

    dexOptions {
        javaMaxHeapSize "6g"
    }

    defaultConfig {
        applicationId "com.yitter.android"
        minSdkVersion 15
        targetSdkVersion 24

        multiDexEnabled true // Enabling multidex support.
        renderscriptTargetApi 23
        renderscriptSupportModeEnabled true
    }

    buildTypes {
        release {
            minifyEnabled false
            //runProguard false
            //proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

repositories {
    mavenCentral()
    maven { url "https://jitpack.io" }
}

dependencies {
    //NeuMob
    compile 'com.neumob:neumob-android:2.3.7'

    // Material Design Navigation Drawer
    compile('com.mikepenz:materialdrawer:5.3.6@aar') {
        transitive = true
    }

    // Crop Image
    compile 'com.theartofdev.edmodo:android-image-cropper:2.2.+'

    // Material Design Font Icons
    compile "com.mikepenz:iconics-core:2.7.1@aar"
    compile "com.android.support:appcompat-v7:24.1.1"
    compile 'com.mikepenz:google-material-typeface:2.2.0.2.original@aar'
    compile 'com.mikepenz:material-design-iconic-typeface:2.2.0.2@aar'
    compile 'com.mikepenz:fontawesome-typeface:4.6.0.2@aar'

    //Facebook Audience Network
    compile 'com.facebook.android:audience-network-sdk:4.13.0'

    compile 'com.bartoszlipinski:recyclerviewheader2:2.0.1'
    compile 'com.ms-square:etsyblur:0.1.3'
    compile 'com.android.support:appcompat-v7:24.0.0'

    // recyclerview
    compile 'com.android.support:recyclerview-v7:24.0.0'

    // material design
    compile 'com.android.support:design:24.0.0'

    // google analytics
    compile 'com.google.android.gms:play-services-analytics:8.4.0'

    // paypal purchasing todo change to 'compile' (2k more methods..?)
    compile files('libs/PayPalAndroidSDK-2.7.1.jar')

    // Module dependency on ParseLoginUI library sources
    compile project(':ParseLoginUI')

    // Consider using these in future - Wes Feb 2016
    //compile 'com.parse:parseui-login-android:0.0.1'
    //compile 'com.parse:parseui-widget-android:0.0.1'

    // Parse
    compile 'com.parse:parse-android:1.13.0'
    compile 'com.parse:parsetwitterutils-android:1.10.5'
    compile 'com.parse:parsefacebookutils-v4-android:1.10.4@aar'

    // excluding bolts-android because parse-android uses bolts-tasks which conflicts
    // hint: use 'gradlew app:dependencies' to inspect
    compile('com.facebook.android:facebook-android-sdk:4.14.0') {
        exclude module: 'bolts-android'
        exclude module: 'bolts-tasks'
    }

    // Butterknife
    compile 'com.jakewharton:butterknife:8.4.0'
    apt 'com.jakewharton:butterknife-compiler:8.4.0'

    // AppRater
    compile files('libs/AppRater.jar')

    // retrofit http api
    compile 'com.squareup.retrofit2:retrofit:2.0.0-beta4'
    compile 'com.squareup.retrofit2:adapter-rxjava:2.0.0-beta4'
    compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta4'
    compile 'com.squareup.okhttp3:logging-interceptor:3.0.1'

    // reactivex
    compile 'io.reactivex:rxjava:1.1.6'
    compile 'io.reactivex:rxandroid:1.2.1'

    // picasso image loading
    compile 'com.squareup.picasso:picasso:2.5.2'

    // stripe for payment processing
    compile 'com.stripe:stripe-android:1.0.4'
}
Stepparent answered 12/9, 2016 at 20:24 Comment(2)
By the way, I see you have appcompat-v7:24.1.1"... as well as appcompat-v7:24.0.0'... Try to use only one as well as keep the version number consistent for recyclerview-v7 and designPouch
Thanks for the heads up manStepparent
S
20

According to the Butter Knife readme you need

buildscript {
    repositories {
        mavenCentral()
    }
   dependencies {
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
    }
}

in the build.gradle file in the root directory of your Android Studio project.

Shields answered 12/9, 2016 at 20:33 Comment(0)
E
3

Add

    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'

in dependencies in your top-level (project) build.gradle file.

Equine answered 12/9, 2016 at 20:28 Comment(4)
Thanks. Also had to make sure that in D:\yitter-android\gradle\wrapper\gradle-wrapper.properties, package was set to gradle-2.14.1-all.zip.Stepparent
Still can't get the Bind annotation to resolve itself :(Stepparent
Oh looks like it was replaced with @BindView: github.com/JakeWharton/butterknife/blob/…Stepparent
@bluemunch Yeah, it's always good to know what happen between versions :)Equine
D
0
 dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath 'me.tatarka:gradle-retrolambda:3.1.0'
    classpath 'org.robolectric:robolectric-gradle-plugin:1.0.1'
    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

apply plugin: 'me.tatarka.retrolambda'

  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

    retrolambdaConfig 'net.orfjackal.retrolambda:retrolambda:2.4.0'
Dichromatic answered 17/3, 2018 at 8:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.