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

我是研究僧i 提交于 2019-11-30 04:41:58

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

Right click the RES folder

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

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

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

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

You should see this popup

Click ok

At this point you should be good to go.

humazed

It is just a bug! Anyway I find a way to get it back:

  1. Write anything in styles.xml that is related to new material theme example: <item name="android:colorPrimary">@color/colorPrimary</item>

  2. It will show you an error hover over it and press Alt+Enter.

  3. choose the first choice Override Resource in values-v21.

I know it isn't the best way to do that, but it works until anyone can find a better way.

Try to switch from Android to [![Project][1]][1] as shown below

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!