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 Build a Self-Destructing Message Android App Sending Messages Sending the Message

Package names

Hi all,

I managed to break my code somehow so had to 'reset' one of the lessons by downloading the project files from the video website.

These files, obviously, come with the package name of com.teamtreehouse.ribbit. I have tried to refactor that to be my web address with limited success. I now have two sets of files in the gen folder, one with my web address and another with com.teamtreehouse.

This is causing all sorts of includes to be added to various files as both folders have a BuildConfig.java and a R.java file. So my resources seem to be split between the two, strangely. So, when I'm stipulating R.string. lines, I'm have to be very explicit and insert com.teamtreehouse.com.R.string..

How can I clean this up to remove references to com.teamtreehouse and just have one source. Where can I look to find where the reference to com.teamtreehouse is and refactor that.

Thanks,

Steve.

Still struggling with this ... perhaps Ben Jakuben can help? ;-)

Ben Jakuben
Ben Jakuben
Treehouse Teacher

So sorry for my delay here! I'll take a look and see how to get past this.

1 Answer

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

Okay, we need to get your package names straightened out, and then clean and rebuild everything. We won't ever touch anything in the gen (generated) folder.

For moving the classes into your own package, you can try one of the solutions listed here: http://stackoverflow.com/a/18637004/475217

Note that you may need to search and replace instances of the old package name in the manifest with any of these solutions.

Then you'll do a full project clean and rebuild, which will cause all the files in the gen folder to be regenerated. Hope this helps!