gpt4 book ai didi

java - 错误: unmappable character (0x98) for encoding windows-1251

转载 作者:行者123 更新时间:2023-11-30 02:06:11 26 4
gpt4 key购买 nike

我在项目组装时遇到问题:

D:...\Main.java:112: error: unmappable character (0x98) for encoding windows-1251
robot.getBrowserControl().findElement(By.xpath("//div[.='НАПИСАТЬ']")).click();

此行错误:robot.getBrowserControl().findElement(By.xpath("//div[.='НАПИСАТЬ']")).click();

图片: error , IDEA settings 。右下角选择UTF-8。我不确定,但也许它就像符号“И”

img errors

这是我的 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'
}

最佳答案

设置 Java 编译的编码选项应该会有所帮助:

compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'

关于java - 错误: unmappable character (0x98) for encoding windows-1251,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51280015/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com