使用这些导入时要编译哪些 google 个 jar 文件

Which google jar files to compile when using these import

首先我用的是

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

所以我在使用

时收到一条错误消息
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'

但是这些导入文件仍然需要一些编译文件来导入这些库。

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

添加:

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

包名(据我所知)也总是依赖名。所以 com.google.android.gms.**location**.xyz 包含在 com.google.android.gms:play-services-**location**:a.b.c.

此外,您应该将所有 9.0.2 依赖项更新到当前的 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'