Reputation:
Getting this Error when attempting to add ButterKnife to my Gradle.
When attempting to just put..
compile 'com.jakewharton:butterknife:8.0.1'
apt 'com.jakewharton:butterknife-compiler:8.0.1'
In the Module:app
I get the error.. "Gradle DSL method not found: 'apt()'
Following the answer outlined here - Gradle DSL method not found: 'apt()'
I place the...
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
Into the Project gradle file, this produces the same 'apt()' error.
Finally, attempting to place
'com.neenbedankt.android-apt'
and/or
'android-apt'
As outlined in the documentation - https://github.com/JakeWharton/butterknife
Now results in the same Gradle DSL method error, but this time 'apply()' instead of 'apt()'
How can I get this working?
Upvotes: 1
Views: 5166
Reputation: 408
Please add this on top of your module level build.gradle file.
apply plugin: 'android-apt'
I also faced similar problem and resolved using this.
Upvotes: 1
Reputation:
Issue resolved by following answer found here - How to setup ButterKnife plugin in Android Studio?
Credit goes to Waqar Younis (https://stackoverflow.com/users/3678308/waqar-younis) for comment provided above which linked to the answer
Upvotes: 1