I am trying to add the latest version of butterknife and I get this error from gradle:
Error:(31, 0) Gradle DSL method not found: 'apt()' Possible causes:
The project 'MyProject' may be using a version of Gradle that does not contain the method. Gradle settings The build file may be missing a Gradle plugin. Apply Gradle plugin
Where my gradle mobile
build.gradle
is:
plugins {
id "net.ltgt.apt" version "0.6"
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.mynamspace.myproject"
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
wearApp project(':wear')
testCompile 'junit:junit:4.12'
compile 'com.jakewharton:butterknife:8.0.0'
apt 'com.jakewharton:butterknife-compiler:8.0.0'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.android.support:design:23.3.0'
compile 'com.android.support:support-v4:23.3.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
}
What's wrong with the gradle-apt-plugin?
plugins
syntax before, and that does not appear to be theandroid-apt
plugin. – Erastesandroid-apt
plugin?...I confess I am a bit lost here, I don't know much about gradle, I just got this plugin in a google search for "gradle apt" – Muna