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

Crystal Ball App - error msg in AndroidManifest.xml

Hi,

I am in the Build a Simple Android App - Pretty Little Things - Adding an Image

I am building two copies of the app, one for me and one my daughter is putting her own predictions into.

My daughter's copy of the app is working fine up to this point and my copy has an error in the AndroidManifest.xml

It says " - Class referenced in the manifest, net.johannson.askme.MainActivity, was not found in the project or the libraries"

I don't know what the heck the problem is. The MainActivity is there. My daughter's "SuperPredictor" version of the app is not giving this error, it is working fine, and the code is exactly the same (except for using two different names whenever the instructions say to use CrystalBall).

I followed the instructions exactly the same in the two copies of the app that I am making. I am tearing my hair out trying to find the problem.

Any suggestions would be much appreciated.

Thanks.

4 Answers

This happened to me recently too, spent some time researching and theres a few reasons this could have happened.

Try these: project -> Clean

or

delete R.java (it will re-generate, dont worry!) delete gen and bin folders (they will come back! )

My own problem was more cause i was using an invalid property inside of the layout xml file, be cautious of everything you code cause it can bite you in the butt. It seems that R.java isnt pointing to the correct spot.

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

If Paulo's suggestions don't work, zip up your project and send it to help@teamtreehouse.com and we'll take a look. :)

The Project -> Clean worked!

Thanks for your help :-)

You're very welcome! :)

I encountered the same problem and also solved it with Project -> Clean

Can anyone explain what that does exactly?

Ben Jakuben
Ben Jakuben
Treehouse Teacher

Cleaning the project deletes all generated and cached files that Eclipse uses when building your project. Normally they don't cause any problems, but sometimes something gets "stuck" that corrupts how the project builds and we need to clean and/or restart Eclipse.