android - 使用不同版本的 Google Play 服务库

标签 android android-studio google-play-services

我想在我的 Google 项目中包含不同版本的库。

例如,我正在使用

compile "com.google.android.gms:play-services-base:6.5.87"
compile "com.google.android.gms:play-services-location:6.5.87"
compile "com.google.android.gms:play-services-maps:6.5.87"

我想包括

compile 'com.google.android.gms:play-services-identity:7.5.0'

同样,但我得到编译器错误,无法找到 analyticsgcm 类。

是将所有库升级到 7.5.0 的唯一解决方案吗?是否可以使用不同版本的 Google Play 服务库?我想知道所有不同的解决方案是什么。

最佳答案

list of selective APIs包括所有可用的 API。对于 GCM,您需要包含 play-services-gcm 库。

但是,您包含的所有 API 必须来自同一版本的 Google Play 服务 - 所有都必须是 7.5.0 或所有 6.5.87.

关于android - 使用不同版本的 Google Play 服务库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31999107/

相关文章:

java - Android流畅的游戏循环

android - PJSip 账号注册

项目依赖中jar的Android "has already been added to output"错误

android-studio - 在 Android Studio 中对齐锚定小部件以填充空白

android - 放大安卓应用程序启动图标

android - 从源代码构建 Android - 模拟器和 AVD

android - Google Playstore 应用程序版本检查不再有效

android - 如何在 Android 模拟器中下载 Google Play 服务?

android - 无法解析符号 PlusShare

android - 无法在我的 Mac 上打开和编辑 .bash_profile