Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selective Google Play Services API not finding classes

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.

like image 469
Ionut Negru Avatar asked Jun 28 '16 13:06

Ionut Negru


1 Answers

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'
like image 53
Ionut Negru Avatar answered Sep 21 '22 22:09

Ionut Negru