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
Jordan Pokladnik
5,748 PointsInvalid file name
I saved the Crystal Ball image to my computer and no matter where it was (User/My pictures, Pictures, even just C:) or what I titles the image (Crystal Ball, CrystalBall or ball01) it would give me the following error. 30:21 - Crystal Ball] res\drawable-mdpi\crystal ball.png: Invalid file name: must contain only [a-z0-9_.] I had no problems with anything else after that (bringing up the image, scaling it, moving to different phones, landscaping) until I tried to run it and it told me I needed to fix the error. How do I proceed?
4 Answers
Jordan Pokladnik
5,748 PointsIt would still give me the error when I added the file ball01 for some reason, but when I made that the pic, it let me run it. Thanks.
James Barnett
39,199 PointsThat's telling the only valid file names are lowercase letters, numbers and the _ character.
Jordan Pokladnik
5,748 Pointsbut one thing I called it was ball01 and it still didn't work.
Jordan Pokladnik
5,748 PointsIt's working now.
James Barnett
39,199 PointsJames Barnett
39,199 PointsBen Jakuben - Can you shed any light on what's going on here?
Ben Jakuben
Treehouse TeacherBen Jakuben
Treehouse TeacherGlad you got it working, Jordan! Sounds like James pinpointed the issue. My guess was that something about your project became corrupted within Eclipse and needed some kind of jolt to be regenerated or deleted from cache or whatever. When changing resource files it's a good practice to clean and rebuild your project rather than a regular build, and in some cases you may need to completely uninstall and reinstall your app from your device or emulator.