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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Peaches Stubbs](https://secure.gravatar.com/avatar/1f96802f61e98cc9f8d8314709fc5948?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Peaches Stubbs
21,320 PointsProblem rebuilding the Fun Facts App, when adding the class FactBook ?
Hi I am rebuilding the app using my own facts and colors. All was going well until I reached the part where you add the Class FactBook, as shown in the video below.
When I hover over it it gives me the error 'Cannot resolves symbol FactBook'. I have rebuilt the app and cleaned it. I also restarted Android Studio. What do you guys think the problem can be? Thanks in advance.
4 Answers
![Kevin Haube](https://uploads.teamtreehouse.com/production/profile-photos/1603092/micro_avi4.jpg)
Kevin Haube
12,265 PointsIf you could give us the snippit of the code, it would help greatly! :) I may know a few solutions if I can get a look at it.
![Peaches Stubbs](https://secure.gravatar.com/avatar/1f96802f61e98cc9f8d8314709fc5948?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Peaches Stubbs
21,320 PointsOkay I figured out the problem. I did create the FactBook calss file but, I created it under the wrong folder. I corrected this by creating it under the right folder, duplicating the code then deleting the first FactBook file that I created in the wrong folder.
![Peaches Stubbs](https://secure.gravatar.com/avatar/1f96802f61e98cc9f8d8314709fc5948?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Peaches Stubbs
21,320 PointsOkay does this help :
public class InterestingFactsActivity extends Activity { private FactBook mFactBook;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_interesting_facts);
//Declare our View variables and assign the views from the layout file.
final TextView factLabel = (TextView) findViewById(R.id.FacttextView) ;
Button showFactButton = (Button) findViewById(R.id.ShowFactButton);
View.OnClickListener listener = new View.OnClickListener() {
@Override
public void onClick(View view) {
//Update the label with our dynamic fact.
factLabel.setText("");
}
};
showFactButton.setOnClickListener(listener);
}
![Kevin Haube](https://uploads.teamtreehouse.com/production/profile-photos/1603092/micro_avi4.jpg)
Kevin Haube
12,265 PointsCould you post your FactBook class as well? The declaration mentioned by Kate is correct, and if that gave you an error, it must be within the FactBook class.
![Kate Hoferkamp](https://secure.gravatar.com/avatar/b4233b64dd9694eaf4653c30923b1071?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Kate Hoferkamp
5,205 PointsTry adding this to your declaration.
private FactBook mFactBook = new FactBook();
![Peaches Stubbs](https://secure.gravatar.com/avatar/1f96802f61e98cc9f8d8314709fc5948?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Peaches Stubbs
21,320 PointsI did as you suggested now both FactBooks are giving the same error message.