What is the difference between the styles.xml in the values folder and the styles.xml in the values-v11 ?

And which of them uses Android Studio ?

    2 answers 2

    Android Studio uses EVERYTHING because it is an IDE - it builds the program, but does not execute it.

    But the specific device on which the application is running is only those resources with qualifiers ( -v11 in your case, the SDK version qualifier) ​​that are suitable for this device. You urgently need to familiarize yourself with the assignment of qualifiers when choosing alternative (most appropriate for the current device on which the application is running) resources.

    Specifically for your question.
    The style file (and all other files in this folder), which is located in the / res / values-v11 / folder, will be used for devices (smartphones, tablets, etc.) on which SDK11 or higher ( Android 3.0 Honeycomb and newer) is installed.
    What is in the /res/values/ folder is the default resources (without any qualifiers), they will be used for devices to which resources with qualifiers could not be selected . In your case, on all devices with android version is less than Android 3.0 Honeycomb ( API 10 or less).

    This material needs to be learned very seriously, because it is one of the fundamentals of android development (proper support for device fragmentation)

    • Thank. But one more question: I use API 15 and above. Why, if I delete values-v11 - an error appears in the manifest? - user189127
    • Because the -v11 qualifier for API11 and above, API15 is also included here. Obviously in the style that you delete is the theme that is used for these APIs. - pavlofff

    These directories indicate that you need to use different styles depending on the version of the SDK.

    If you have only 2 values-v11 and values folders there, then:

    values-v11 will be used if SDK version 11 and higher

    values for the remaining cases

    Also, there may be resources for different screen sizes. For example values-sw600dp for screens with 600dp and more