title: "main" java.lang.NoSuchMethodError: 'void com.google.common.base.Preconditions.checkArgument(boolean, java.lang.String, char, java.lang.Object)'
body: <p>I am getting this error, even after trying different versions of jars available and unable to find the <code>Preconditions</code> class in my intelliJ workspace.<br>
  Not sure why this method is getting called. I'm getting this runtime exception every time i run the code.<br>
  I am trying grpc and protobuffers for the first time but I'm not sure what to do about the below error.  </p>
  
  <blockquote>
  <pre><code>"main" java.lang.NoSuchMethodError: 
  'void com.google.common.base.Preconditions.checkArgument(  
           boolean, java.lang.String, char, java.lang.Object)'
  </code></pre>
  </blockquote>
  
  <p>My <strong>dependencies</strong> look like this:</p>
  
  <pre><code> &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.grpc&lt;/groupId&gt;
              &lt;artifactId&gt;grpc-all&lt;/artifactId&gt;
              &lt;version&gt;1.29.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.auto.value&lt;/groupId&gt;
              &lt;artifactId&gt;auto-value-annotations&lt;/artifactId&gt;
              &lt;version&gt;1.6.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.12&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.inject&lt;/groupId&gt;
              &lt;artifactId&gt;guice&lt;/artifactId&gt;
              &lt;version&gt;4.2.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-cli&lt;/groupId&gt;
              &lt;artifactId&gt;commons-cli&lt;/artifactId&gt;
              &lt;version&gt;1.4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
              &lt;artifactId&gt;guava&lt;/artifactId&gt;
              &lt;version&gt;20.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
              &lt;artifactId&gt;httpcore&lt;/artifactId&gt;
              &lt;version&gt;4.4.8&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.netty&lt;/groupId&gt;
              &lt;artifactId&gt;netty-all&lt;/artifactId&gt;
              &lt;version&gt;4.1.49.Final&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  </code></pre>
  
  <p>And my <strong>mvn dependency:tree o/p is below</strong>.  </p>
  
  <pre><code>[INFO] +- io.grpc:grpc-all:jar:1.29.0:compile
  [INFO] |  +- io.grpc:grpc-api:jar:1.29.0:compile (version selected from constraint [1.29.0,1.29.0])
  [INFO] |  +- io.grpc:grpc-auth:jar:1.29.0:compile
  [INFO] |  |  \- com.google.auth:google-auth-library-credentials:jar:0.20.0:compile
  [INFO] |  +- io.grpc:grpc-context:jar:1.29.0:compile
  [INFO] |  +- io.grpc:grpc-core:jar:1.29.0:compile (version selected from constraint [1.29.0,1.29.0])
  [INFO] |  |  +- com.google.code.gson:gson:jar:2.8.6:compile
  [INFO] |  |  +- com.google.android:annotations:jar:4.1.1.4:compile
  [INFO] |  |  \- io.perfmark:perfmark-api:jar:0.19.0:compile
  [INFO] |  +- io.grpc:grpc-grpclb:jar:1.29.0:compile
  [INFO] |  |  +- com.google.protobuf:protobuf-java:jar:3.11.0:compile
  [INFO] |  |  \- com.google.protobuf:protobuf-java-util:jar:3.11.0:compile
  [INFO] |  +- io.grpc:grpc-netty:jar:1.29.0:compile
  [INFO] |  |  +- io.netty:netty-codec-http2:jar:4.1.48.Final:compile (version selected from constraint [4.1.48.Final,4.1.48.Final])
  [INFO] |  |  |  +- io.netty:netty-common:jar:4.1.48.Final:compile
  [INFO] |  |  |  +- io.netty:netty-buffer:jar:4.1.48.Final:compile
  [INFO] |  |  |  +- io.netty:netty-transport:jar:4.1.48.Final:compile
  [INFO] |  |  |  |  \- io.netty:netty-resolver:jar:4.1.48.Final:compile
  [INFO] |  |  |  +- io.netty:netty-codec:jar:4.1.48.Final:compile
  [INFO] |  |  |  +- io.netty:netty-handler:jar:4.1.48.Final:compile
  [INFO] |  |  |  \- io.netty:netty-codec-http:jar:4.1.48.Final:compile
  [INFO] |  |  \- io.netty:netty-handler-proxy:jar:4.1.48.Final:compile
  [INFO] |  |     \- io.netty:netty-codec-socks:jar:4.1.48.Final:compile
  [INFO] |  +- io.grpc:grpc-okhttp:jar:1.29.0:compile
  [INFO] |  |  +- com.squareup.okio:okio:jar:1.13.0:compile
  [INFO] |  |  \- com.squareup.okhttp:okhttp:jar:2.7.4:compile
  [INFO] |  +- io.grpc:grpc-protobuf:jar:1.29.0:compile
  [INFO] |  |  +- com.google.api.grpc:proto-google-common-protos:jar:1.17.0:compile
  [INFO] |  |  \- io.grpc:grpc-protobuf-lite:jar:1.29.0:compile
  [INFO] |  +- io.grpc:grpc-services:jar:1.29.0:compile
  [INFO] |  +- io.grpc:grpc-stub:jar:1.29.0:compile
  [INFO] |  +- io.grpc:grpc-testing:jar:1.29.0:compile
  [INFO] |  |  \- io.opencensus:opencensus-api:jar:0.24.0:compile
  [INFO] |  \- io.grpc:grpc-xds:jar:1.29.0:compile
  [INFO] |     +- io.grpc:grpc-alts:jar:1.29.0:compile
  [INFO] |     |  +- org.apache.commons:commons-lang3:jar:3.5:compile
  [INFO] |     |  +- org.conscrypt:conscrypt-openjdk-uber:jar:2.2.1:compile
  [INFO] |     |  \- com.google.auth:google-auth-library-oauth2-http:jar:0.20.0:compile
  [INFO] |     |     +- com.google.http-client:google-http-client:jar:1.34.0:compile
  [INFO] |     |     |  +- org.apache.httpcomponents:httpclient:jar:4.5.10:compile
  [INFO] |     |     |  |  +- commons-logging:commons-logging:jar:1.2:compile
  [INFO] |     |     |  |  \- commons-codec:commons-codec:jar:1.11:compile
  [INFO] |     |     |  \- io.opencensus:opencensus-contrib-http-util:jar:0.24.0:compile
  [INFO] |     |     \- com.google.http-client:google-http-client-jackson2:jar:1.34.0:compile
  [INFO] |     |        \- com.fasterxml.jackson.core:jackson-core:jar:2.10.1:compile
  [INFO] |     +- io.opencensus:opencensus-proto:jar:0.2.0:compile
  [INFO] |     \- io.grpc:grpc-netty-shaded:jar:1.29.0:compile (version selected from constraint [1.29.0,1.29.0])
  [INFO] +- com.google.auto.value:auto-value-annotations:jar:1.6.2:compile
  [INFO] +- junit:junit:jar:4.12:test
  [INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
  [INFO] +- commons-cli:commons-cli:jar:1.4:compile
  [INFO] +- com.google.guava:guava:jar:22.0:compile
  [INFO] |  +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
  [INFO] |  +- com.google.errorprone:error_prone_annotations:jar:2.0.18:compile
  [INFO] |  +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
  [INFO] |  \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
  [INFO] +- org.apache.httpcomponents:httpcore:jar:4.4.8:compile
  [INFO] \- io.netty:netty-all:jar:4.1.49.Final:compile
  </code></pre>
  
  <p>I have checked the existing posts as well on this issue but none seems to be working for me. I believe there might be some issue with the versions but all the versions seem to be giving this error only.</p>