Information:java: Multiple encodings set for module chunk platf "GBK" will be used by compile
来源:互联网 发布:晨曦软件培训 编辑:程序博客网 时间:2024/06/05 00:46
Intellij IDEA 在引入代码后,出现编译错误。
Information:java: Multiple encodings set for module chunk platf "GBK" will be used by compileError:(221, 70) java: unclosed string literalError:(221, 84) java: ';' expected
猜想是编码问题。
项目的默认编码设置的UTF-8
在Settings - Editor - File Encodings 中设置了
IDEA Encoding UTF-8
Project Encoding UTF-8
改变每个引入.java文件的编码为UTF-8 但是编译还是会出现以上异常。
因为在复制引入的时候,IDEA 会在.idea/encoding.xml中制定文件的编码。
将其中内容删除即可。
原:
<?xml version="1.0" encoding="UTF-8"?><project version="4"> <component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8"> <file url="file://$PROJECT_DIR$" charset="UTF-8" /> <file url="file://$PROJECT_DIR$/src/main/java/com/bestpay/model" charset="GBK" /> <file url="file://$PROJECT_DIR$/src/main/java/com/bestpay/utils/DateUtils.java" charset="GBK" /> <file url="file://$PROJECT_DIR$/src/main/java/com/bestpay/utils/HttpUtils.java" charset="GBK" /> <file url="file://$PROJECT_DIR$/src/main/java/com/bestpay/utils/MD5.java" charset="GBK" /> <file url="PROJECT" charset="UTF-8" /> </component></project>删除后:
<?xml version="1.0" encoding="UTF-8"?><project version="4"> <component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8"> <file url="file://$PROJECT_DIR$" charset="UTF-8" /> <file url="PROJECT" charset="UTF-8" /> </component></project>
即可编译正常。
http://blog.csdn.net/ouvidia/article/details/44782677
http://blog.csdn.net/tomcat_2014/article/details/50593589
0 0
- Information:java: Multiple encodings set for module chunk platf "GBK" will be used by compile
- java: Multiple encodings set for module chunk test "GBK" will be used by compiler
- java: Multiple encodings set for module chunk test "GBK" will be used by compiler
- IDEA 14.0.4 编译maven项目时Multiple encodings set for module chunk test "GBK" will be used by compiler
- C++ error "intellisense information will not be available for vc++"
- 043-OCPThe memory used by Streams will be allocated from the shared pool
- iOS--错误集锦--The image set name xxx is used by multiple image sets.
- C++ error "intellisense information will not be available for vc++" 2011.06.13
- warning: no umbrella header found for target 'xxxxx', module map will not be generated
- Android—Step by step - Compile kernel module for Samsung Galaxy S3 (Linux)
- will not be managed by Spring 和was not registered for synchronization because synchronization is n
- Where used list for multiple data elements
- The new table will be used at the next reboot
- Unknown version string [3.1]. Default version will be used.
- Accessible apps can be used by everyone,
- Accessible apps can be used by everyone
- Win mobile will be dead by 2011?
- listener will be interrupted by Rendezvous Error
- 末端哨兵(end sentinel)
- Java程序员必会的Linux命令
- 原型继承和Class继承
- OSI模型分层和协议
- 一行代码实现Dialog展示引导页
- Information:java: Multiple encodings set for module chunk platf "GBK" will be used by compile
- Android 判断锁屏、开屏等状态
- Hadoop学习笔记—3.Hadoop RPC机制的使用
- 05-Hadoop的HA搭建
- SQL高级语句-DROP 语句,可以轻松地删除索引、表和数据库。
- 二手轮之 Swift 纯代码布局简化版
- 四、memcached启动参数详细介绍
- Geoserver 谷歌栅格地图的使用 多级发布
- 实现搜索框始终位于页面顶部(采用Materialize)