Kanwar preet Kanwar preet - 3 months ago 5
Android Question

Which google jar files to compile when using these import

First i was using

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


so i was getting an error message now i am using

compile 'com.google.android.gms:play-services-maps:9.0.2'
compile 'com.google.android.gms:play-services-auth:9.0.2'
compile 'com.google.android.gms:play-services-gcm:9.0.2'


But still these import file need some compile file to import these lib.

import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.plus.Plus;

Answer

Add:

compile 'com.google.android.gms:play-services-location:9.0.2'
compile 'com.google.android.gms:play-services-plus:9.0.2'

The package name is (as far as I know) always the dependencie name as well. So com.google.android.gms.**location**.xyz is contained in com.google.android.gms:play-services-**location**:a.b.c.

Further you should update all 9.0.2 dependencies to the current 9.4.0:

compile 'com.google.android.gms:play-services-maps:9.4.0'
compile 'com.google.android.gms:play-services-auth:9.4.0'
compile 'com.google.android.gms:play-services-gcm:9.4.0'
compile 'com.google.android.gms:play-services-location:9.4.0'
compile 'com.google.android.gms:play-services-plus:9.4.0'
Comments