4

I have add the liberary of Google Play services as :

compile 'com.google.android.gms:play-services:6.5.87'

for using Google Places API, but still it does not resolve the 'Places' interface below:

  mGoogleApiClient = new GoogleApiClient
                .Builder(this)
                .addApi(Places.GEO_DATA_API)
                .addApi(Places.PLACE_DETECTION_API)
                .addConnectionCallbacks(this)
                .addOnConnectionFailedListener(this)
                .build();

For using Google Places API, which liberary I have to use or import as a seprate project. Also it does not resolve below too:

import com.google.android.gms.nearby

Neha
  • 135
  • 1
  • 7
  • Have followed [https://developers.google.com/places/android/start]? – Roon13 May 19 '15 at 06:30
  • For initialize gPluse client follow https://developers.google.com/+/mobile/android/getting-started#step_3_initialize_the_plusclient – Jaiprakash Soni May 19 '15 at 06:31
  • Yes, I am following the same document, only to add google play service to the project and its respective dependencies. Not able to find the correct way to resolve the issue – Neha May 19 '15 at 06:32
  • @JaiSoni but that still does not resolve, I need to add the Places interface..!! – Neha May 19 '15 at 06:52
  • Resolved: I have the the jar file separately into the lib folder. Thanks :) – Neha May 19 '15 at 07:06
  • @Neha Then give answer of your question and mention jar u have included and accept it – Jaiprakash Soni May 19 '15 at 09:37
  • I have added the google-play-services.jar to the lib folder; compile it in build.gradle file as : compile files('libs/google-play-services.jar') and that's it. My issue got resolved. – Neha May 19 '15 at 09:43
  • Please go to this link for correct answer: [http://stackoverflow.com/questions/30968189/android-studio-can-not-resolve-com-google-android-gms-location-places-autocomple] – Neha Nov 18 '15 at 11:02

1 Answers1

5

Consider to add com.google.android.gms:play-services-places:<latest version> to the build.gradile.

Alex Chengalan
  • 8,211
  • 4
  • 42
  • 56