9

I've updated play services to the latest version, which currently is at 9.2.0 and I also want to use selective modules for the google play services.

//    compile 'com.google.android.gms:play-services:9.2.0'
compile 'com.google.android.gms:play-services-maps:9.2.0'
compile 'com.google.android.gms:play-services-analytics:9.2.0'
compile 'com.google.android.gms:play-services-gcm:9.2.0'
compile 'com.google.android.gms:play-services-location:9.2.0'

The issue I'm having, is that now the imports like:

import com.google.android.gms.location.places.Place;

import com.google.android.gms.location.places.AutocompleteFilter;
import com.google.android.gms.location.places.AutocompletePrediction;
import com.google.android.gms.location.places.Place;
import com.google.android.gms.location.places.PlaceBuffer;
import com.google.android.gms.location.places.Places;

Cannot be resolved anymore, although in their documentation it is stated that location services should provide Places features also.

Can someone help me with this Issue? Thank you.

6
  • 2
    Did you notice that we have play-services-places too ? seems like in 9.2.0 they splitted it
    – Selvin
    Jun 28, 2016 at 13:46
  • Have you built your project since adding the dependency? Jun 28, 2016 at 13:47
  • @Selvin I studied the list from this page: developers.google.com/android/guides/…. I didn't notice, I'm trying it now. Jun 28, 2016 at 13:51
  • @Tanis.7x offcourse I did :) Jun 28, 2016 at 13:51
  • @Selvin You were right, they splitted the services. I gues the documentation wasn't updated. Thank you. Jun 28, 2016 at 13:56

1 Answer 1

26

Based on the comment added by @Selvin, I managed to find the solution for my issue.

It seems that on version 9.x.x, Google Play Services API for Places was moved from play-services-location into play-services-places. Thus, now I'm having the following dependencies for Google Play Services APIs:

//    compile 'com.google.android.gms:play-services:9.2.0'
compile 'com.google.android.gms:play-services-maps:9.2.0'
compile 'com.google.android.gms:play-services-analytics:9.2.0'
compile 'com.google.android.gms:play-services-gcm:9.2.0'
compile 'com.google.android.gms:play-services-location:9.2.0'
compile 'com.google.android.gms:play-services-places:9.2.0'
1
  • You found a solution and you posted the answer for other people's benefit, thanks. Dec 7, 2016 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.