Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

values-21, values-22 or values-xx folder is gone after Android Studio 1.0

When I create a new project with API14 as minimum, then there is no values-21 or values-22 folder in my project. I don't see any styles.XML anywhere, so how should I put in XML code for just Lollipop?

I use Android Studio 1.0.1, and I have SDK 21, 21.1.1, 24.0.2 installed.

like image 403
DMT82 Avatar asked Dec 18 '14 18:12

DMT82


People also ask

Where is values XML file in Android Studio?

You are changing values in file which is generated by Android Studio, so it is changed every time you build your project. All files inside build folders are generated and there is no need in changing them. Instead you should put your values in values. xml under app->src->main->res->values .

What is value folder Android studio?

The res/values folder is used to store the values for the resources that are used in many Android projects to include features of color, styles, dimensions etc.


1 Answers

Updated: Since API 22 has been released. API 23 is the same idea.

Right click the RES folder

enter image description here

Then type values-v22 as the directory name and choose xml as the resource type.

enter image description here

If you do NOT see the values-v22 show up, click the Project pulldown at the top of the screen like so. e.g. Change from Android to Project

enter image description here

Now right click styles.xml in the values folder and choose copy

enter image description here

Now right click the values-v22 folder and click paste.

enter image description here

You should see this popup

enter image description here

Click ok

At this point you should be good to go.

like image 102
bjiang Avatar answered Sep 23 '22 01:09

bjiang