Prasoon Pandey
Prasoon Pandey

Reputation: 33

Why is android studio not allowing me to select a locale region?

I want to use resource qualifiers to create a locale specific strings.xml file for English (United States) but when in the "New Resource File" window, if I select a language (English) and then select ANY region, the region quickly gets de-selected and thus, only a language specific locale is being allowed.

No error is being shown as well.

This is the video to the error

Android Studio version: 2021.1.1 OS: Windows 11

Upvotes: 0

Views: 220

Answers (1)

Jacouille
Jacouille

Reputation: 1121

As stated in comments, I can't reproduce your error on my machine. But I've found a work around for you.

Simply create (with command line, or file explorer) a directory named as you need (for example "values-en-rUS" for en-US local, you can see that directory name on your video just before it unselect itself), and then simply create a file value.xml inside.

enter image description here

2 examples i created inside my res directory

Now, you would be able to find it in your android studio project tab as in my example :

enter image description here

results from android studio project window

I know this does not fix your problem, but at least you can work

Upvotes: 1

Related Questions