Reputation: 1418
Step 1 : Right click on res folder, choose New > Android Resource Directory
Step 2 : Choose layout
in resource type, then click OK
Result : Error in name : enter or select a qualifier
It's not happen with menu type. Do I missing something? I have to create directory instead
Upvotes: 12
Views: 9981
Reputation: 623
It's an old question but whoever is having the same problem might find this helpful. Here's another way to create an android resource directory in the layout folder.
Also, make sure to refactor and rename(whatever you like) the XML file that gets generated automatically after creating the resource folder.
Upvotes: 12
Reputation: 153
Yeah, AS 3.0+ seems to do that to me as well.
But there really shouldn't be a difference between a new Android Resource Directory and just a new (regular) Directory if you don't actually use any qualifiers. It's still just a directory with a different name depending on the qualifier(s). So, you can safely choose new Directory and move along.
And for the sake of it, you can choose new Android Resource Directory with some random qualifier which will just add the qualifier to the directory name, and after it's created, refactor it by deleting the qualifier part from the directory name and you'll end up with a directory named "layout" which is an "Android Resource Directory".
Just do the refactoring with the Project view selected in the Project pane, not the Android view.
Upvotes: 4