Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android

Lauren Boyes
Lauren Boyes
2,516 Points

Crystal Ball: Eclipse Error Message

Hi,

Hope someone else has come across this because I've run out of ways to get this working.

Any time I make any changes to the AndriodManifest.xml file (such as changing the screen orientation) Eclipse begins to show an error message relating to

<activity
...
>

When hovering over <activity I get the error message;

"Class referenced in the manifest, com.example.thecrystalball.MainActivity, was not found in the project or the libraries"

I do not understand how making a minor change could result in the activity class not being recognised.

Any suggestions would be very much appreciated.

Thanks

1 Answer

Couple of things for you to try:

  1. Go to your manifest and press Ctrl + Shift + F This should reformat your code (Anytime my manifest misbehaves this seems to do the trick)

  2. Go to Project -> Clean and clean your project

  3. If those steps have worked, make sure you update your environment by opening up SDK manager and installing any updates, and then go to `Help -> Check for Updates' to make sure that you are totally up to date.

Lauren Boyes
Lauren Boyes
2,516 Points

It just needed a wee clean, thank you very much!

Awesome! Glad I could help.