在 Android Studio 中比较文件

如果我在一个项目中有两个不同的类/布局文件。有没有什么方法可以让我用 Android Studio 比较一下哪些行是不同的?

38369 次浏览

Select them both by selecting one, holding down ctrl (or command for mac) and clicking the second file, right-click, Compare Files.

enter image description here enter image description here

Go to file name in project then press control then select Compare File and select another file you wish to compare.

Seperate window will open up showing differences by colour contrast.