warning: LF will be replaced by CRLF in android/app/build.gradle.

本文讲述了在Android项目中遇到的CRLF与LF换行符问题,通过设置`git config --global core.autocrlffalse`来解决,并解释了Windows与Linux换行符差异。

问题

warning: LF will be replaced by CRLF in android/app/build.gradle.
The file will have its original line endings in your working directory

原因是存在符号转义问题

windows中的换行符为 CRLF, 而在linux下的换行符为LF,所以在执行add . 时出现提示。

解决方案

git config --global core.autocrlf false
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks fetch --prune --tags origin git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks pull --no-commit origin master From http://gitlab-esd.leapmotor.com/iov/APP_HarmanyOS/LP_HARMONYOS_APP_SDK * branch master -> FETCH_HEAD warning: in the working copy of 'VehicleService/lmv_archive/archive/BuildProfile.ets', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'VehicleService/lmv_archive/mock/BuildProfile.ets', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'VehicleService/lmv_common/common/BuildProfile.ets', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'VehicleService/lmv_common/function/BuildProfile.ets', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'VehicleService/lmv_common/socket/BuildProfile.ets', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'VehicleService/lmv_feature/blecentral/BuildProfile.ets', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'VehicleService/lmv_feature/blekey/BuildProfile.ets', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'VehicleService/lmv_feature/blekeyui/BuildProfile.ets', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'VehicleService/lmv_feature/carhome/BuildProfile.ets', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'VehicleService/lmv_feature/carinfo/BuildProfile.ets', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'VehicleService/lmv_feature/onekeyReady/BuildProfile.ets', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'VehicleService/lmv_feature/temperatureControl/BuildProfile.ets', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'VehicleService/lmv_feature/verifyAndRemote/BuildProfile.ets', LF will be replaced by CRLF the next time Git touches it error: Your local changes to the following files would be overwritten by merge: VehicleService/lmv_common/common/src/main/ets/common/MQTTEventModel.ets VehicleService/lmv_common/function/src/main/ets/ui/LMVProgress.ets VehicleService/lmv_common/socket/src/main/ets/mqtt/MQTTEventModel.ets VehicleService/lmv_feature/carhome/src/main/ets/modules/carhome/vm/CarHomeViewModel.ets VehicleService/lmv_feature/caroxygen/src/main/ets/comp/CarOxygenSwitchComp.ets VehicleService/lmv_feature/caroxygen/src/main/ets/comp/OxygenLevelTipsComp.ets Merge with strategy ort failed. 完成时带有错误,见上文。
最新发布
08-23
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值