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 trial
Having problem using Butter Knife for Building a Weather App
I'm getting a Cannot resolve symbol 'InjectView'. I copy/paste compile 'com.jakewharton:butterknife:7.0.1' into the build.gradle and then sync the gradle. copy/paste the code @InjectView(R.id.timeLabel) TextView mTimeLabel; and that's when I got the error.
Seth Kroger56,412 Points
Change the line in build.gradle to: compile 'com.jakewharton:butterknife:6.1.0' Then sync project with gradle and try again.
The update to ButterKnife from 6 to 7 changed the names on most of the annotation and functions. Keeping it at version 6 should let you follow along with the course without issue.
Sushant Saurabh8,352 Points
There have been a couple of changes in the ButterKnife API recently. either change it in the build.gradle file to a previous version (Version 6). Or use @Bind(R.id.loginText) TextView mLoginText; and @ButterKnife.bind(this);
I'll look into it, when I'm done with this lesson. thank you.