- import xxx.view;
+ import xxx.view;
解决:
1. 配置 Git 全局换行符(Mac/Windows 通用)
bash
运行
git config --global core.autocrlf input
之后所有项目,拉代码、reset 都不会乱改换行符。
2. 丢弃这些无意义变更
bash
运行
git checkout .
把这些伪修改直接清掉。
3. 关闭 AS 自动修剪行尾空格
Settings → Editor → General把 Strip trailing spaces on Save 改成 None
有可能第三步没有找到:
路径 1:Editor → General → On Save(最关键)
把 Remove trailing spaces 取消勾选,就不会自动删行尾空格了。