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

Akshay Shivpuri
Akshay Shivpuri
2,917 Points

Project files gone missing

Hi there, I'm facing a serious issue. Don't know what has happened, but my project files have gone missing. Kindly check the screenshot. I'm not able to find my xml files for layout and many folders are missing. Here's the screenshot of the package explorer tab. What should I do? http://goo.gl/2FIvG2

7 Answers

Have you checked for the files outside of Eclipse wherever you have your workspace stored? For example: C:\Users\your_name\workspace\app_name\src

From within Eclipse you could also try right clicking on your project and choosing Restore From Local History

Akshay Shivpuri
Akshay Shivpuri
2,917 Points

Hi Ryan, Fortunately all files are there in the workspace folder. Should I restore from local history? or maybe delete the project from the workspace(without delecting the contents on the disk) and import it again?

Akshay Shivpuri
Akshay Shivpuri
2,917 Points

I tried restoring from local history and selected all the available files being displayed in the drop down menu but unfortunately then also, all the rest of the files are not being shown up.

Akshay Shivpuri
Akshay Shivpuri
2,917 Points

Also I'm getting this error along

"Errors occurred during the build. Errors running builder 'Android Pre Compiler' on project 'Inspire me'. Path must include project and resource name: /Inspire me"

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

Sorry for your trouble!

Step 1: Make a copy of your project files in a separate directory or a zip file, or check them into source control. :)

Once you have them backed up, I think you might have luck deleting the project in Eclipse and re-importing it. When you delete it, just make sure you don't "delete contents on disk". It will only delete the project from within Eclipse. Then you can import a project using the same directory. If you still have trouble with the new version, post notes in here and we can try to troubleshoot from there.

Akshay Shivpuri
Akshay Shivpuri
2,917 Points

Hi Ben, I deleted the project from the workspace(not deleting it from disk). But while I re-import it, I get an error[screenshot here: http://goo.gl/INQjX1] It says,"Resource /inspire me already exists".

How should I proceed?

Ben Jakuben
Ben Jakuben
Treehouse Teacher

Ah, I think that's because you have the checkbox "Copy project to workspace" checked, but it's already in your workspace folder. Try it again with that box unchecked.

Akshay Shivpuri
Akshay Shivpuri
2,917 Points

oh sorry. But when I do that without checking the "Copy project to workspace", it does nothing. I mean when I click finish, it doesn't appear in the package explorer column

Ben Jakuben
Ben Jakuben
Treehouse Teacher

Are you importing it as an Android project (Android > Existing Android code into workspace) or as a general project (General > Existing project into workspace)? I've encountered bugs here and there with the Android version and typically have better luck with the General path. Can you try that and let me know if you get any error messages?

Ben Jakuben
Ben Jakuben
Treehouse Teacher

It looks like your .project file is corrupted. If you delete that you can try importing again.

Imgur

Akshay Shivpuri
Akshay Shivpuri
2,917 Points

Thanks Ben, It worked perfectly. :)