gpt4 book ai didi

android - 如何使用 Google Play Services 6.5 粒度依赖管理

转载 作者:IT老高 更新时间:2023-10-28 21:54:11 25 4
gpt4 key购买 nike

这个问题不再有效。但答案可能对其他人仍然有用,所以我将其留在这里。


原问题:

blogpost 中从 11 月 17 日开始,Google 的家伙们引入了期待已久的粒度依赖管理(以应对 dex 方法限制)。 12 月 8 日,我仍然无法下载 sdk(6.1 是最新可用的),也无法获取有关如何引入粒度依赖的文档。这个有消息吗?或者想知道如何在正式发布之前获得它?

最佳答案

注意!

我将不再维护这个答案,因为 Google 现在在发布版本方面做得非常好。在他们的 Android Developers Blog 上发表帖子, official release notes并且经常在他们的 YouTube channel 上播放视频简要概述了新功能。

我将保留最后两个(截至撰写时)更新和原始答案。请查找以前的更新here

2016 年 10 月更新,Play 服务 9.8.0

Google Play Services Release Notes , Google Maps APIs Release Notes

support-v4 依赖

com.google.android.gms:play-services-base:9.8.0
-> com.google.android.gms:play-services-basement:9.8.0
-> com.android.support:support-v4:24.0.0 -> 24.2.1

2016 年 5 月更新,Play 服务 9.0.1

Blog Post , Google Play Services Release Notes , Google Maps APIs Release Notes

# Google+
compile com.google.android.gms:play-services-plus:9.0.1
# Google Account Login
compile com.google.android.gms:play-services-auth:9.0.1
# Google Actions, Base Client Library
compile com.google.android.gms:play-services-base:9.0.1
# Google Address API
compile com.google.android.gms:play-services-identity:9.0.1
# Google App Indexing
compile com.google.android.gms:play-services-appindexing:9.0.1
# Google App Invites
compile com.google.android.gms:play-services-appinvite:9.0.1
# Google Analytics
compile com.google.android.gms:play-services-analytics:9.0.1
# Google Cast
compile com.google.android.gms:play-services-cast:9.0.1
# Google Cloud Messaging
compile com.google.android.gms:play-services-gcm:9.0.1
# Google Drive
compile com.google.android.gms:play-services-drive:9.0.1
# Google Fit
compile com.google.android.gms:play-services-fitness:9.0.1
# Google Location, Activity Recognition, and Places
compile com.google.android.gms:play-services-location:9.0.1
# Google Maps
compile com.google.android.gms:play-services-maps:9.0.1
# Google Mobile Ads
compile com.google.android.gms:play-services-ads:9.0.1
# Mobile Vision
compile com.google.android.gms:play-services-vision:9.0.1
# Google Nearby
compile com.google.android.gms:play-services-nearby:9.0.1
# Google Panorama Viewer
compile com.google.android.gms:play-services-panorama:9.0.1
# Google Play Game services
compile com.google.android.gms:play-services-games:9.0.1
# SafetyNet
compile com.google.android.gms:play-services-safetynet:9.0.1
# Android Pay
compile com.google.android.gms:play-services-wallet:9.0.1
# Android Wear
compile com.google.android.gms:play-services-wearable:9.0.1

2015 年 12 月更新,Play 服务 8.4.0

Blog Post , Video , Google Play Services Release Notes , Google Maps APIs Release Notes

dependencies {
# Google+
compile com.google.android.gms:play-services-plus:8.4.0
# Google Account Login
compile com.google.android.gms:play-services-auth:8.4.0
# Google Actions, Base Client Library
compile com.google.android.gms:play-services-base:8.4.0
# Google Address API
compile com.google.android.gms:play-services-identity:8.4.0
# Google App Indexing
compile com.google.android.gms:play-services-appindexing:8.4.0
# Google App Invites
compile com.google.android.gms:play-services-appinvite:8.4.0
# Google Analytics
compile com.google.android.gms:play-services-analytics:8.4.0
# Google Cast
compile com.google.android.gms:play-services-cast:8.4.0
# Google Cloud Messaging
compile com.google.android.gms:play-services-gcm:8.4.0
# Google Drive
compile com.google.android.gms:play-services-drive:8.4.0
# Google Fit
compile com.google.android.gms:play-services-fitness:8.4.0
# Google Location, Activity Recognition, and Places
compile com.google.android.gms:play-services-location:8.4.0
# Google Maps
compile com.google.android.gms:play-services-maps:8.4.0
# Google Mobile Ads
compile com.google.android.gms:play-services-ads:8.4.0
# Mobile Vision
compile com.google.android.gms:play-services-vision:8.4.0
# Google Nearby
compile com.google.android.gms:play-services-nearby:8.4.0
# Google Panorama Viewer
compile com.google.android.gms:play-services-panorama:8.4.0
# Google Play # Game services
compile com.google.android.gms:play-services-games:8.4.0
# SafetyNet
compile com.google.android.gms:play-services-safetynet:8.4.0
# Google Wallet
compile com.google.android.gms:play-services-wallet:8.4.0
# Android Wear
compile com.google.android.gms:play-services-wearable:8.4.0
}

support-v4 依赖

com.google.android.gms:play-services-base:8.4.0
-> com.google.android.gms:play-services-basement:8.4.0
-> com.android.support:support-v4:23.0.0 -> 23.4.0

2015 年 8 月更新,Play 服务 7.8.0

Google Play Services Release Notes , Google Maps APIs Release Notes

support-v4 依赖

com.google.android.gms:play-services-base:7.8.0
-> com.android.support:support-v4:22.2.0 -> 22.2.1

原答案

它们刚刚被释放(见 highlights )。你可以找到更多关于如何使用细粒度依赖的信息 here .

您需要使用 SDK 提供的 SDK 管理器或使用 Jake Whartons sdk-manager-plugin 等插件更新本地 Google Play 服务存储库对于 Gradle,它将自动为您更新。使用 Gradle 构建时看起来像这样:

Google Play 服务存储库已过时。正在下载更新...

编辑 1

在撰写本文时,第二个链接似乎已损坏,例如,即使在下拉菜单中选择了 Using Android Studio,它也没有显示信息,至少对我而言.要查看 Android Studio 的信息,请选择 Using something else,然后再次选择 Using Android Studio

编辑 2

Google Maps APIs Release Notes

dependencies {
# Google+'
compile 'com.google.android.gms:play-services-plus:6.5.+'
# Google Account Login
compile 'com.google.android.gms:play-services-identity:6.5.+'
# Google Activity Recognition
compile 'com.google.android.gms:play-services-location:6.5.+'
# Google App Indexing
compile 'com.google.android.gms:play-services-appindexing:6.5.+'
# Google Cast
compile 'com.google.android.gms:play-services-cast:6.5.+'
# Google Drive
compile 'com.google.android.gms:play-services-drive:6.5.+'
# Google Fit
compile 'com.google.android.gms:play-services-fitness:6.5.+'
# Google Maps
compile 'com.google.android.gms:play-services-maps:6.5.+'
# Google Mobile Ads
compile 'com.google.android.gms:play-services-ads:6.5.+'
# Google Panorama Viewer
compile 'com.google.android.gms:play-services-panorama:6.5.+'
# Google Play Game services
compile 'com.google.android.gms:play-services-games:6.5.+'
# Google Wallet
compile 'com.google.android.gms:play-services-wallet:6.5.+'
# Android Wear
compile 'com.google.android.gms:play-services-wearable:6.5.+'
# Google Actions
# Google Analytics
# Google Cloud Messaging
compile 'com.google.android.gms:play-services-base:6.5.+'
}

support-v4 依赖

com.google.android.gms:play-services-base:6.5.87
-> com.android.support:support-v4:21.0.0 -> 21.0.3

编辑 3

Google 刚刚发表了一篇关于 Google Play Services 6.5 and the 65k method limit 的博文.它包含我的帖子等信息。对于通过 SO 而不是博客文章遇到此信息的任何人,我将仅引用一段:

Note: At the time of writing, the correct version to use is 6.5.87. As this is a very granular number, it will get updated quite quickly, so be sure the check the latest version when you are coding. Often people will use a ‘+’ to denote versions, such as 6.5.+ to use the latest 6.5 build. However, it’s typically discouraged to use a ‘+’ as it can lead to inconsistencies.

关于android - 如何使用 Google Play Services 6.5 粒度依赖管理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27353619/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com