Reputation: 287
I want to use Google Places API in my android application. I have API Key I got it from Google's API console. I am following the Perform Autocomplete section in this tutorial.
Now the problem I am facing is exactly which jar file I need for this. I have tried with two:
google-api-client-1.6.0-beta.jar
In this case I am getting exception when creating the object of class where I have implemented these methods and imported the packages of above library
google-http-client-1.6.0-beta.jar
GoogleHeaders cannot be resolved to a type
If I comment the code where I am setting header to request it does not shows any error but when I execute the code I get the following error:
java.lang.NoClassDefFoundError: com.google.common.base.Preconditions
I have also added all the dependency jars.
Upvotes: 2
Views: 1554
Reputation: 5112
There is no need to use a specific client. Just use any library that can make HTTP requests (like Apache HttpClient), then parse the JSON (or XML) that you get back from the Places API.
Upvotes: 1