idea java: 未结束的字符串文字

如果工具所有编码都设置为UTF-8了,那么最后终极方法:

找到项目下:

.idea/encodings.xml 

将这个里面的编码全部统一UTF-8,  可能由于直接复制了文件过来,idea会给文件编码写死为GBK

 

<?xml version="1.0" encoding="UTF-8"?>

<project version="4">

  <component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="UTF-8">

    <file url="file://$PROJECT_DIR$" charset="UTF-8" />

    <file url="file://$PROJECT_DIR$/ticket-app-core" charset="UTF-8" />

    <file url="file://$PROJECT_DIR$/ticket-app-remote" charset="UTF-8" />

    <file url="file://$PROJECT_DIR$/ticket-app-task" charset="UTF-8" />

    <file url="file://$PROJECT_DIR$/ticket-app-web" charset="UTF-8" />

    <file url="PROJECT" charset="UTF-8" />

  </component>

</project>

 

 

你可能感兴趣的:(编码,idea)