【发布时间】:2017-03-30 16:30:57
【问题描述】:
我正在升级一个应用程序,在我的 build.gradle 文件中,我有这个:
dependencies {
..........
compile 'com.google.android.gms:play-services:9.8.0'
..........
}
在 Urban Airship 提供的 Android SDK 设置快速入门指南中,他们将其作为示例代码提供:
dependencies {
..........
// Recommended for location services
compile 'com.google.android.gms:play-services-location:9.8.0'
..........
}
如果我使用“play-services:9.8.0”,我会假设它还包括“play-services-location:9.8.0”,因为“play-services-location:9.8.0”应该是“play-services:9.8.0”,但我想确认一下。你知道这是否是一个正确的假设吗?谢谢。
【问题讨论】:
-
为什么不使用最新的:
compile 'com.google.android.gms:play-services:10.2.1' -
当然,所以我的问题是,“编译'com.google.android.gms:play-services:10.2.1'”是否包括“编译'com.google.android.gms:play-服务位置:10.2.1'”?我的问题的目的不是关注特定版本,而只是确认导入“play-services”是否包括在导入“play-services-location”的情况下您还拥有的所有内容,假设“play-services -location”是“play-services”的子集,因为“play-services”是超集。
-
最好使用最零散的库,以避免不需要的代码=)
-
我知道,你是绝对正确的,但我只是想确认导入“play-services”是否会包括你使用“play-services-location”时所拥有的一切,但它看起来像答案是肯定的。
标签: android push-notification urbanairship.com