Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPathetic Geek
2,070 PointsThe butterknife library is outdated and the project does not compile and give way many errors. What am i supposed to do?
The library is outdated , the project doesn't compile. even after updating the library and binding views by @BindView it gives many errors. What to do now..?
4 Answers
Seth Kroger
56,413 PointsThe latest build tools require you have an annotationProcessor
entry for any library that uses one, like ButterKnife, along with the compile
entry.
dependencies {
compile 'com.jakewharton:butterknife:7.0.1'
annotationProcessor 'com.jakewharton:butterknife:7.0.1'
// ...
}
Erick R
5,293 PointsCan you post your code or further information? If the course uses an outdated version of the library you can download that same version. However, you should read the documentation for the newer release sometimes methods and functions change names or are implemented differently. You should still be able to use the newer library.
Pathetic Geek
2,070 PointsThis is the link which is given in the notes - https://github.com/treehouse/android-animations-transitions/tree/2a6bd784e23d94dcfd3e90a8fffb8216cc9a2641 This issue is from almost 2 years back the code should be updated till now. Github Issue - https://github.com/treehouse/android-animations-transitions/issues/1 I have tried by updating the library and fixing the code but new issues arise as the butterkinfe library has changed way too much till now..
Erick R
5,293 PointsI see what you are talking about. Have you tried to change the app build.gradle to match the projects?
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.jimulabs.mirrorsandbox:mirror-sandbox:0.2.1'
compile 'com.android.support:palette-v7:23.1.1'
}
This should work if Jake still has the repo up for that version. If not i am currently analayzing the docs maybe i will take a crack at it. However if this issue is not resolved i suggest we both write to treehouse about it.
Erick R
5,293 Points7.0.1 is the outdated version the new one is sitting on version 8. Do you get any errors when building the project with the following 7.0.1?
Pathetic Geek
2,070 Pointsya i tried every possible combination in the gradle files but nothing is working . It always give one or another error.
Pathetic Geek
2,070 PointsIf you get any solution let me know or else will write to treehouse. If you'll be writing to treehouse let me know at may mail shivnagi143@gmail.com , i will write too.
Victor Cuc
7,281 PointsYou now need to add butterknife-compiler to the annotation processor!
dependencies {
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}