使用这些导入时要编译哪些Google jar文件 [英] Which google jar files to compile when using these import

查看:76
本文介绍了使用这些导入时要编译哪些Google jar文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先我正在使用

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'

但是这些导入文件仍然需要一些编译文件才能导入这些lib.

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;

推荐答案

添加:

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中.

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.

此外,您应将所有9.0.2依赖项更新为当前的9.4.0:

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'

这篇关于使用这些导入时要编译哪些Google jar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆