Locate the file: In the Project view (usually on the left), navigate to app/src/main/res/layout/.2.Find new.xml: Locate your file named new.xml.3.Refactor/Rename: Right-click on new.xml and select Refactor > Rename.4.Choose a new name: Enter a new, valid name for your layout file.