Whenever I try to add a resource folder to my Android project in Eclipse (3.7.0), I always get the following error:
invalid resource directory name: C:\path_to_project\res/new_folder_name
You’ll notice that the slash goes the wrong way for the newly created folder, so I’m guessing this is some sort of Windows-specific issue, though I can’t for the life of me figure out how to resolve it.
Here’s some of the ways I tried creating the folder:
- Right click on “res” in project in Eclipse -> New -> Folder
- Create the new folder through Windows Explorer and import it into the Eclipse project
- Remove the project from my workspace entirely, create the folder in Explorer, and re-import the entire project into Eclipse
- Do the same using the command line, both Cygwin and DOS
In all of these cases, I end up with the slash going the wrong way.
What am I missing?
Folders in the res-Folder are only allowed to be those defined by Android, for example “drawable”. See http://developer.android.com/guide/topics/resources/available-resources.html for more information. If you choose anything else you get the error “invalid resource directory name” when building your project.