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 Android Tools Using Git for Android Creating a New GitHub Project

Coping Android App to new Workspace where Git has been initialized [Help Please]

Hi there!

What I have done is the following:

1- I have the Crystal Ball android app finished (Its running in the simulator and my phone) 2 - I have created a GitHub account. I have created a repository called CrystalBall. 3 - In the terminal. I chose a folder where I cloned the git repository that I have created in github. 4 - I copied the files from the CrystalBall to the new folder where the .git file is. -- I am using eclipse and I think the way you open a new project is by importing the android project right?

5 - So what I did is converted the folder "new_workspace" where my "crystalBall" repository is into a new workspace in eclipse. And imported the crystalBall project from my previous workspace, into the new workspace where the .git file is.

Result: 21 errors. Most of them of type: Java Problem. Like:

ActionBarActivity cannot be resolved into a type. Error retrieving parent for item:.... and so on

Please help??

3 Answers

Marcus Vieira
Marcus Vieira
7,877 Points

Hi Alo!

Do you still have the original folder where the project is ? If you do, you can:

  • Go to the project folder on your terminal;
  • git init - to init a new git repo;
  • git remote add https://github.com/your-github-username/your-repo.git - to add a remote;
  • git add . - to stage all the files;
  • git commit -m 'your-message-here' - to comimit;
  • git push origin master - to push to your repo on github;

If that's not an option, let me know so I can try and think of something else :)

Hey Marcus!

Thanks for the response. I followed your instructions and it worked great. Before pushing origin master I had to pull the remote files first. But after that the procedure was successful.

Thank you!!

Marcus Vieira
Marcus Vieira
7,877 Points

You're welcome, Alo! I'm glad it worked! :)