ant异常整理-错误: 非法字符: \65279 .

本文介绍了在使用Ant进行项目打包时遇到的非法字符65279错误及其解决方案。提供了修改文件编码及直接重建文件内容两种方法,并解释了这些错误通常与文件编码不一致有关。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一. 在用ant把项目打包,遇到一个问题:编译java文件的时候,有些java文件报非法字符 \65279错误

在eclipse中根据错误提示,找到有【错误: 非法字符: \65279】的java文件,先将文件编码改为:ISO-8859-1, 然后打开这个java文件,在最开始的位置找到几个乱码字符【】,删除乱码字符,然后再把该文件的编码重新改回utf-8,最后重新编译就OK啦 。
这个是网上的解决方法,试了一下很多情况下无法使用。
 
二.另外一种方式是把报错的这个java文件删除掉,再重新手动输入一遍内容,重新编辑就可以了。
 
三. ant异常整理-错误: 非法字符: \65279 . 是ant build的时候无法识别格式。
/deep/ .ant-tree { position: relative; /deep/ &::before { content: ''; width: 1px; height: 100%; height: calc(100% - 35px); position: absolute; border-left: 1px solid #d9d9d9; left: -6px; top: 18px; } /deep/ .ant-tree-treenode-switcher-open, /deep/ .ant-tree-treenode-switcher-close { position: relative; } >li:first-child:nth-last-child(1)::after { border: 0; } } /deep/ .ant-tree-treenode-switcher-close::after, /deep/ .ant-tree-treenode-switcher-open::after { content: ''; width: 8px; height: 1px; position: absolute; border-top: 1px solid #d9d9d9; left: -6px; top: 18px; } /deep/ .ant-tree > li:last-child::after { content: ''; width: 8px; height: 100%; border-top: 1px solid #d9d9d9; background-color: #fff; position: absolute; left: -6px; top: 18px; } /deep/ .ant-tree-treenode-switcher-close::before{ border: 0 !important; } /deep/.ant-tree-child-tree.ant-tree-child-tree-open > li:first-child { padding-top: 4px; } .last-menu-line() { position: absolute; left: 12px; width: 1px; height: 100%; margin: 22px 0 0; border-left: 1px solid #d9d9d9; content: ' '; } ul.ant-tree.icon-tree /deep/li { & > .ant-tree-checkbox { margin-left: 24px; & + .ant-tree-node-content-wrapper > .ant-tree-title { > i:nth-child(1) { position: absolute; left: -42px; top: 5px; } } } } ul.ant-tree /deep/li { position: relative; &:nth-last-child(1) { /deep/&.ant-tree-treenode-switcher-open::before { .last-menu-line; height: calc(100% - 46px); } } &:before { position: absolute; left: 12px; width: 1px; height: 100%; height: calc(100% - 42px); margin: 22px 0 0; border-left: 1px solid #d9d9d9; content: ' '; } .ant-tree-node-content-wrapper { padding: 0; position: relative; } ul.ant-tree-child-tree.ant-tree-child-tree-open > li { &::after { content: ''; position: absolute; width: 8px; height: 1px; border-top: 1px solid #d9d9d9; background: transparent; top: 15.5px; left: -5px; margin: 0; } &:nth-last-child(1) { &.ant-tree-treenode-switcher-open::before { .last-menu-line; height: calc(100% - 37px); } } } span.ant-tree-switcher { background: rgba(0, 0, 0, 0); } } div ul.ant-tree /deep/li.ant-tree-treenode-switcher-open { > ul.ant-tree-child-tree-open > li:nth-last-child(1) > ul::before { content: ''; width: 1px; height: 100%; position: absolute; background: #fff; left: -6px; top: 16px; } > ul.ant-tree-child-tree-open > li:nth-last-child(1) > span { &.ant-tree-node-content-wrapper::before { content: ''; width: 1px; position: absolute; background: #fff; left: -30px; top: 13px; height: calc(100% + 10px); } &.ant-tree-checkbox + .ant-tree-node-content-wrapper::before { top: 13px; left: -52px; } } > .ant-tree-node-content-wrapper-normal::before { content: ''; width: 1px; height: 100%; position: absolute; background: #fff; left: -12px; top: 16px; } }vue3写法
最新发布
06-27
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值