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 trialBraeden Adams
687 Pointsfailed to convert @drawable
Trying to upload images to the design but keep getting this error "failed to convert @drawable/._main_title into a drawable. Ive tried using a different device and API nut nothing works. Ive also restarted Andriod Studio and nothing works
3 Answers
Ben Jakuben
Treehouse TeacherHi Braeden,
"._main_title" is an illegal file name for images in Android because of the "." character. Is this a file you've downloaded or named yourself? It should generally be like @drawable/main_title
bal puk
Courses Plus Student 1,913 PointsI had the same error with PROPER file name. I think the new version of the Android Studio punked me. The files couldn't be reached by the ImageView src property, while they were in the oldschool four-folder structure. My Android Studio can only use files from the drawable directory itself. It's not just like there's no need for the 4 different directories for different dpi pictures, it does not even work that way.
Roseanna Grundy
Courses Plus Student 584 PointsI'm having difficulty with the correct filename on the most recent Android Studio (as of this date). I will move the images to the drawable folder to see if that helps.
Roseanna Grundy
Courses Plus Student 584 PointsGot it working, not sure what the cost is. I moved all xxhdpi images to the 'drawable' folder. I deleted the other drawable-* folders. After cleaning project, the image appears.
Braeden Adams
687 PointsBraeden Adams
687 PointsThis was the name that came with all of the files in the teachers notes under your videos! I have fixed the problem! Thx! Your videos are great!