Not able to call getIndex API from java

Hi,
I just started with algolia.
Trying to figure out how it works and how I can use it for my product. As I started, I’m getting this below error constantly.

Exception in thread “main” java.lang.NoSuchMethodError: com.google.common.util.concurrent.SimpleTimeLimiter.create(Ljava/util/concurrent/ExecutorService;)Lcom/google/common/util/concurrent/SimpleTimeLimiter;
at com.algolia.search.TimeoutableHostNameResolver.(TimeoutableHostNameResolver.java:20)
at com.algolia.search.ApacheHttpClient.(ApacheHttpClient.java:67)
at com.algolia.search.ApacheAPIClientBuilder.build(ApacheAPIClientBuilder.java:124)
at com.algolia.search.APIClientBuilder.build(APIClientBuilder.java:120)

Doing as mentioned in API reference for java.

added below dependency in my maven project.

com.algolia algoliasearch [2,]

Using java version 1.8.
Any help would be appreciated.

1 Like

same here, totally stuck on this one… tried, updating guava, gson… checking my dependency tree… nothing has worked yet… really suck :frowning:

@ivanmworozi
Check dependency tree. There must be some other library using earlier version of guava library.
If you are using maven project setup , try putting algolia maven dependency at the top.