studio - manifest file in android tutorial point




Android studio 3.5 refactor issue (5)

If you don't have any custom code style for your IDE

File | Settings | Editor | Code Style | XML | Arrangement

Find gear(settings) icon in the top, click it then press "restore defaults".

I just updated my studio with android studio 3.5 and now when I am trying to refactor AndroidManifest.xml file and it is refactoring my all app permission to the bottom of my file.

Have any one faced this issue? Is there any solution for this refactoring issue?

Before refactor:

After refactor:

It is applicable to my all project files.

Why it matters:



Just adding more details .

This is a known issue with android studio from Android Studio 3.5 Canary 8 . It should get fixed in next version as this turned out to affect large number of developers .

You can see status of the bug here

Also the solution is

Broken XML code style

When editing XML code, the IDE might apply an incorrect code style when you select Code > Reformat Code from the menu bar. To fix this issue, reset the appropriate Android code style as follows:

  1. Open the Settings window by clicking File > Settings (on macOS, Android Studio > Preferences).
  2. In the left panel, click Editor > Code Style > XML.
  3. Near the top-right corner of the right panel, select Set from > Predefined Style > Android
  4. Click OK.

Which is found here -> Known issues with Android Studio and Android Gradle Plugin


You just need to set xml layout for Android applications from the settings.

Follow this steps:

1. Go to Android Studio > Preferences . For Windows, go to File > Settings .

2. Search for xml in search bar.

3. Under code style section, select xml tab.

4. In the top right corner, click on set from... and under predefined style , select Android

5. Click on Apply and try to refactor.


  • ctrl + alt + s
  • Search XML

I wanted to do the same steps as the first answer, but I just needed to change the default scheme to project.

I hope that you also solve it this way . Sorry for my English !





android-manifest