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 trialDenny Tang
1,012 PointsWhat should my package name be if my company domain is 123.com?
Using com.123.funfacts doesn't work because Android does not allow you to use digits as the first character in a package segment.
Usually you would add an _ underscore (ex. com._123.funfacts) but this isn't allowed in Android Studio
In this case, what is the standard way to name a package?
1 Answer
Ben Deitch
Treehouse TeacherThat's tough. I'm not sure of a standard way for that case, and the docs doesn't provide one either. Looks like it's up to you.
Link:
The name may contain uppercase or lowercase letters ('A' through 'Z'), numbers, and underscores ('_'). However, individual package name parts may only start with letters.
Denny Tang
1,012 PointsDenny Tang
1,012 PointsThanks for the quick reply Ben!
I ended up just spelling the numbers out (i.e. com.onetwothree.funfacts)