当前位置:  开发笔记 > 编程语言 > 正文

如何阻止AndroidStudio覆盖.idea / codeStyles / Project.xml

如何解决《如何阻止AndroidStudio覆盖.idea/codeStyles/Project.xml》经验,为你挑选了0个好方法。

In our project, we have committed .idea/codeStyles/Project.xml to source control with the goal of enforcing a common style among all contributors to the project without affecting the style of other projects.

However, Android Studio appears to be making unwanted changes to this file.

Pulling down the latest code from git and then simply opening Android Studio and then checking git status produces:

Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in working directory)

        modified:   my-project/.idea/codeStyles/Project.xml

no changes added to commit (use "git add" and/or "git commit -a")

The changes it is making look like this:

As you can see it is removing some XML-formatting settings.

I am running Android Studio 3.5, but I can't guarantee that everyone else is, and we would like to keep the project agnostic with respect to IDE-version.

Is there a way to prevent Android Studio from changing these settings? Is there a more recommended way to achieve uniform code-style?

推荐阅读
依然-狠幸福
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有