小编sam*_*hal的帖子

java.lang.NoSuchMethodError: com.google.common.io.ByteStreams.exhaust(Ljava/io/InputStream;)J

我在使用 ServiceCredentials.fromStream() 方法时收到此“java.lang.NoSuchMethodError: com.google.common.io.ByteStreams.exhaust(Ljava/io/InputStream;)J”错误。这里有人遇到过这个问题并且知道解决方法吗?TIA

<project xmlns="http://maven.apache.org/POM/4.0.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>[title]</groupId>
<artifactId>calendar-event-consumer</artifactId>
<version>0.1</version>
<name>${project.artifactId}</name>
<description>Service that listens for events in a queue to push them 
to an external API</description>
<inceptionYear>2017</inceptionYear>

<packaging>jar</packaging>

<properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<encoding>UTF-8</encoding>
<scala.version>2.11.5</scala.version>
<scala.compat.version>2.11</scala.compat.version>
</properties>

<dependencies>
<dependency>
  <groupId>org.scala-lang</groupId>
  <artifactId>scala-library</artifactId>
  <version>${scala.version}</version>
</dependency>

<!-- Test -->
<dependency>
  <groupId>junit</groupId>
  <artifactId>junit</artifactId>
  <version>4.11</version>
  <scope>test</scope>
</dependency>
<dependency>
  <groupId>org.specs2</groupId>
  <artifactId>specs2-core_${scala.compat.version}</artifactId>
  <version>2.4.16</version>
  <scope>test</scope>
</dependency>
<dependency>
  <groupId>org.scalatest</groupId>
  <artifactId>scalatest_${scala.compat.version}</artifactId>
  <version>2.2.4</version>
  <scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/com.rabbitmq/amqp-client -->
<dependency>
  <groupId>com.rabbitmq</groupId>
  <artifactId>amqp-client</artifactId>
  <version>4.2.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
<dependency>
  <groupId>org.slf4j</groupId>
  <artifactId>slf4j-api</artifactId>
  <version>1.7.21</version> …
Run Code Online (Sandbox Code Playgroud)

google-api maven guava service-accounts bytestream

3
推荐指数
2
解决办法
4508
查看次数

标签 统计

bytestream ×1

google-api ×1

guava ×1

maven ×1

service-accounts ×1