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 Build a Simple Android App (retired 2014) Pretty Little Things Adding an Image

Need help with activity_main.xml

I was is the activity_main.xml in eclipse and I accidentally deleted all the code in it. I tried closing it and reopening eclipse but it automatically saved it for me. Can someone help me with the code I need?

1 Answer

Damian Ison
Damian Ison
6,398 Points

What did you have in the code?

You could start a new project and simply copy the code over from the activity_main in the new project into your current one and then re-add your text views and whatever else you have.

Just ensure that the string name will match to the code

Thank you! I got it to work now. :)