I want to add localized strings for my android app. Therefore I need a values-xx folder in my Res folder.
The original values folder has a blue dot, so I tried creat
When you are in the Android view (rather than Project or Packages) in Android studio, you just need to right click the "values" directory and choose New > "Values resource file".
That gives you a chose of different resources you can add. For example, if you want to add a different language to your app you can choose the Language option and press the ">>" button. If you want Swahili then select that from the list, type "strings" for the file name, and press OK.
Android Studio will automatically create a values-sw
directory with the new strings.xml file in it. And in your Android file view you conveniently see both strings files together.
And it is a similar process for adding other types of resources (see my other example). You no longer have to manually add the directories (but you can do that too by right clicking the res directory and choosing New > Android resource directory).
The values-xx folder we created is not showing, but when we create a file its asking =>I have created values-21 folder and then tried with creating an xml and it asks for choosing a directory =>I have updated to Android 1.02
Check the values-21
If you have already created a new directory but just don't see it in the Project Tools window. Do this
Click on Project Tools window >> Android(Drop Down) >> Click Project. Now you'll see all your Directories in res. See the picture:
I had the same problem, what I did was create a values-xx folder inside the main directory (main>>right click>>new>>directory) and then moved that folder to res/ directory.
It's not beautiful but it is a workaround to create a folder with Android studio.
Its very simple. I too had trouble initially. Lets break it stepwise:- 1) Open your project 2) Right click the res folder 3) Choose New 4) Chose Directory 5) Name the directory.
Thats it!! It works for a fresh project everytime!
This bug is fixed in newer versions of Android Studio.