-
Notifications
You must be signed in to change notification settings - Fork 185
Description
I'm trying to use Google Ads API, I already have my ads.properties file ready, and I added the following dependencies to my pom file:
<dependency> <groupId>com.google.api-ads</groupId> <artifactId>google-ads</artifactId> <version>9.0.0</version> </dependency>
<dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>27.0-jre</version> </dependency>
<dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpcore</artifactId> <version>4.4.8</version> </dependency>
But when I try to run the code like this:
File file = new File(this.getClass().getClassLoader().getResource("/ads.properties").getFile());
GoogleAdsClient googleAdsClient = GoogleAdsClient.newBuilder().fromPropertiesFile(file).build();
I get the following error:
org.glassfish.jersey.server.ContainerException: java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
Is there a problem with the library? And how could I fix it?
Would this be a problem with my credentials?