Project.xml file automatically gets edited and staged for commit in android studio after update

Viewed 1361

After updating Android Studio to 3.6.1, the following lines get added in Project.xml in .idea folder.

<AndroidXmlCodeStyleSettings>
  <option name="ARRANGEMENT_SETTINGS_MIGRATED_TO_191" value="true" />
</AndroidXmlCodeStyleSettings>

This file was previously added to git and pushed to GitHub so locally adding to untrack is also not helping. Upon doing so, it is staging it as a new file during the next time I click commit option in VCS tab.

I found here that it might be due to the NDK support plugin but even disabling it is not working.

2 Answers

You just need the remove this file from git.
Use:

git rm --cached <file>

and its no longer be tracked by git.

Since Android Studio always changes the Project.xml file, just try ignore that. If you want to commit or pull, just do a git checkout Project.xml and commit/pull afterwards, just keep in mind to not click into the Project.xml file or it will be changed again

Related