Maven dependencies Java Client Library

721 views
Skip to first unread message

Agustín Scigliano

unread,
Feb 19, 2019, 5:11:46 PM2/19/19
to AdWords API and Google Ads API Forum
Hi, I imported the Java Client Library through Maven with the dependency:

<dependency>
 <groupId>com.google.api-ads</groupId>
 <artifactId>google-ads</artifactId>
 <version>0.6.0</version>
</dependency>

The problem is that after obtaining a GoogleAdsClient, I want to use the method getGoogleAdsServiceClient().
 
And it shows the following error:
 
 java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;CLjava/lang/Object;)V
 
I think the error has to do with the Guava version having to be above 20.0, for what I have been investigating, although including that dependency:

<dependency>
 <groupId>com.google.guava</groupId>
 <artifactId>guava</artifactId>
 <version>27.0.1-jre</version>
</dependency>

The problem persists,

It appears the different versions are in conflict, have you seen this before?
 
Doing a: mvn dependency:tree | less | grep guava, we get the following:

[INFO] \- com.google.guava:guava:jar:27.0.1-jre:compile
[INFO]    +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO]    +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] |  \- com.google.guava:guava:jar:18.0:runtime
[INFO] |  |  |  +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.25.1:compile

Any idea on how to fix this?
 

googleadsapi...@google.com

unread,
Feb 20, 2019, 12:07:31 AM2/20/19
to adwor...@googlegroups.com
Hi Agustin,

Since your concern is more related to the Java client library, you may reach out to the library owners directly via this link for further assistance.

Thanks and regards,
Peter
AdWords API Team

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/42fc6d63-68b2-43dc-b45e-1da283f8057f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages