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

Android Build a Simple Android App (2014) Improving Our Code Simple Refactoring: Using a Class

FactBook

can not resolve symbol FactBook how can i solve this http://grab.by/GMpK

4 Answers

I think i defined the class but am not sure how to organise my imports http://grab.by/GMZM and am getting an error cannot find symbol class FactBook like so http://grab.by/GN0a

Yes - that all looks fine. Very strange.

I'll have a think about that - I'm not sure what to suggest!

Andrew Pritykin
Andrew Pritykin
6,574 Points

Have you tried to rebuild / clean your project?

For Windows/Linux, you can go to File -> Settings -> Editor -> Auto Import -> Java and make the following changes:

change Insert imports on paste value to All

markAdd unambigious imports on the fly option as checked

On a Mac, do the same thing in Android Studio -> Preferences

i created a new FactBook after Exit Android Studio Back up your project Delete all the .iml files and the .idea folder Relaunch Android Studio and reimport your project

and it worked

Have you defined a class called FactBook? You may need to organise your imports to include that first. Make sure your class is called that exactly.

Steve.

Hi Steve can you help me with my project i am thinking of doing a Football Fixture android app or a Recipe app but wanted FF app but dont knw where to start or get the fixture to link with my app so that it updates automatically online more like e Stormy app

Pliz hel