使用google analytics reporting api时出错

cbwuti44  于 2021-06-30  发布在  Java
关注(0)|答案(0)|浏览(263)

我在试着用 Google Analytics Reporting API v4 (java)但是在尝试使用https://developers.google.com/analytics/devguides/reporting/core/v4/quickstart/service-java
由于生成错误,我在pom.xml中添加了以下依赖项,但不确定要添加哪个依赖项来修复错误 java.lang.NoSuchMethodError: com.google.common.io.ByteStreams.exhaust 即使添加了guava依赖版本20.0,仍然存在错误。
添加dependencies:->

<!--Google Analytics Reporting API dependency-->
           <dependency>
                <groupId>com.google.apis</groupId>
                <artifactId>google-api-services-analyticsreporting</artifactId>
                <version>v4-rev20200902-1.31.0</version>
            </dependency>
            <dependency>
                <groupId>com.google.api-client</groupId>
                <artifactId>google-api-client</artifactId>
                <version>1.31.1</version>
            </dependency>
            <dependency>
                <groupId>com.google.api-client</groupId>
                <artifactId>google-api-client-gson</artifactId>
                <version>1.30.4</version>
            </dependency>
            <dependency>
                 <groupId>com.fasterxml.jackson.core</groupId>
                 <artifactId>jackson-core</artifactId>
                 <version>2.12.0</version>
            </dependency>
            <dependency>
                <groupId>com.google.http-client</groupId>
                <artifactId>google-http-client</artifactId>
                <version>1.38.0</version>
            </dependency>

            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>20.0</version>
            </dependency>

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题