java.lang.IllegalAccessError: tried to access method com.google.common.util.concurrent.SimpleTimeLimiter.<init>(Ljava/util/concurrent/ExecutorService;)V from class org.openqa.selenium.net.U rlChecker
Exception in thread "main" io.appium.java_client.service.local.AppiumServerHasNotBeenStartedLocallyException: The local appium server has not been started. The given Node.js executable: C:\Program Fil es\nodejs\node.exe Arguments: [C:\Users\DELL\AppData\Roaming\npm\node_modules\appium\build\lib\main.js, --port, 4490, --address, 0.0.0.0, --log, F:\workspace\user\logs\appium4490.log, -bp, 2259] at io.appium.java_client.service.local.AppiumDriverLocalService.start(AppiumDriverLocalService.java:149) at com.canyan.appium.server.ServersManager.startServers(ServersManager.java:47) at com.canyan.appium.server.StartServers.startServers(StartServers.java:32) at com.canyan.appium.main.TestMain.main(TestMain.java:17) Caused by: java.lang.IllegalAccessError: tried to access method com.google.common.util.concurrent.SimpleTimeLimiter.<init>(Ljava/util/concurrent/ExecutorService;)V from class org.openqa.selenium.net.U rlChecker at org.openqa.selenium.net.UrlChecker.<init>(UrlChecker.java:67) at io.appium.java_client.service.local.AppiumDriverLocalService.ping(AppiumDriverLocalService.java:113) at io.appium.java_client.service.local.AppiumDriverLocalService.start(AppiumDriverLocalService.java:136) ... 3 more
自己最近再高Java的自动化遇到这样的一个报错,我新建的项目是maven的项目,错误的原因是引进的jar包selenium-java和guava的对应不上
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>6.0.6</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>2.8.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>24.1-jre</version>
</dependency>
<dependency>
这个是guava的版本,之前我的selenium-java版本是3.2.0后来改为3.11.0就可以解决了,这个版本好像是一一对应的,现在我还是不太明白是什么意思,希望有大神明白后给与指导,谢谢了