In Android Studio, I want to create the folders values-v14
values-v21
inside the res
folder.
But when I tried to make it like
You can also manage language stuff with the editor, it´s a little faster.
Instead to looking for the file from ANDROID, go to PROJECT and then look for the folder, you will find it there...
it's so simple to find your new values-v21 or recently created.. (1) - Go to project files (2) - app > src > main > res (3) - if here is not visible your directory then (4) - right click on res and select show in explorer (5) - Go inside res here all your files are shows (6) - Then Go inside values > copy style file from there and come back to paste inside your values-v21 folder (7) - you are done .. go to your android studio and see your folder values-v21 is appearing.
Note :- Your folder was empty so you folder was not appear in android studio.
I believe this is like version control, where the folder exists, but you need a file inside in order to view it. I just ran into this, and the folders existed but didn't show up until I had a file inside of them.
I hate to think this is by design. The use-case of a developer hiding their own work-space? Collapsing makes more sense
Switching from the Android
view to the Project
view will allow you to see the directory structure, but it is less convenient for viewing and editing Android files.
There is a better way. Don't use New > Directory
.
Right click values
and choose New > Values resource file
.
Select Version
from the list and click the >>
button. Write styles
as the file name and 14
as the version number and click ok. (Repeat all this for version 21.)
Android Studio will automatically create values-v14
and values-v21
directories with the new styles.xml
files in them. And in your Android project view you conveniently see all three styles.xml
files together.
Other directories and resource files can be similarly added.
Try to switch from Android
to Project
as shown below