GRb*_*3yH 6 java encoding intellij-idea gradle windows-1251
我的项目组装有问题:
D:...\Main.java:112: 错误:编码 windows-1251 的不可映射字符 (0x98)
robots.getBrowserControl().findElement(By.xpath("//div[.='??????) ??']“))。点击();
此错误行:
robot.getBrowserControl().findElement(By.xpath("//div[.='????????']")).click();
图片: 错误,IDEA 设置。右下角选择了UTF-8。我不确定,但也许它就像符号“?”
这是我的 gradle 文件
plugins {
id 'java'
}
group 'ru.grbi3yh.processthesefiles'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
jar {
baseName = 'ProcessthFiles'
}
apply plugin: 'application'
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '2.41.0'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.7'
}
Run Code Online (Sandbox Code Playgroud)
为 Java 编译设置编码选项应该会有所帮助:
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3893 次 |
| 最近记录: |