java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkState(ZLjava/lang/String;) with Selenium, gradle and ChromeDriver

前端 未结 7 1751
别跟我提以往
别跟我提以往 2020-11-27 08:28

I am trying to use Selenium api with Gradle. This is my build.gradle dependency section:

dependencies {
    compile \'com.google.api-client:google-api-clien         


        
7条回答
  •  青春惊慌失措
    2020-11-27 09:17

    Just adding the below was not enough

    
        com.google.guava
        guava
        27.1-jre
    
    

    It was not working first. Then I moved this dependency up higher in pom.xml than junit dependency and it worked. So, make sure that in pom file ,it is higher than junit or testng or whatever runner you are using

    A comment in this post helped

提交回复
热议问题