James-so
James-so

Reputation: 125

layout already exists use a different qualifier

i'm trying to support screens size by create each layouts on Android Studio 3.1.3 i use the following steps to create one xml for example XXXHDPI :

Preview > Orientation for Preview > Create Other > Density and from Density i choose XXXHDPI ,the layout-xxxhdpi of my Activity will created.

but Android Studio 3.2 i can't do that when i try to create layout i get this message :

layout already exists use a different qualifier

enter image description here

Upvotes: 6

Views: 3058

Answers (3)

Rawezh Rasul
Rawezh Rasul

Reputation: 11

You can create in explorer. For first activity you can create in android studio. But for other activities you can use this steps:

  • right click on activity that u want to create large or x-large activity

  • show in explorer

  • copy xml file

  • go to main/res/large-layout in explorer and paste it then close explore.

It works successfully and large activity will appear in android studio.

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Upvotes: -1

Suraj Vaishnav
Suraj Vaishnav

Reputation: 8315

Make sure you are following these steps:

Right click on res folder=> New => Android Resource directory => Then a dialog appear => Resource type from dropdown => select layout => and from qualifier => click on density => >> => then your desired density

Or you can do(This will definitely work)

Create folder by yourself

right click on res=> show in explorer=> under res folder=> create a new folder=> rename it to => layout-xxxhdpi

Upvotes: 2

ʍѳђઽ૯ท
ʍѳђઽ૯ท

Reputation: 16980

If you checked the directory of res/layout-xxxhdpi and it wasn't there so probably that might be a bug. But, you can however try to add the directory manually.

Just go to /res folder of your project and add a new folder called layout-xxxhdpi.


Please use issue tracker or, report a bug of the Android Studio by clicking on the Help -> Report a bug if you insist that it does not exist in there.

Read: https://developer.android.com/studio/report-bugs#studio-bugs

Upvotes: 0

Related Questions