为 Google 分析添加 Google Play 服务

Add Google Play Services for Google Analytics

我想使用 Google 基于以下 link 的分析。我应该将 google 播放服务库添加到 gralde 的依赖项中。我添加 classpath 'com.google.gms:google-services:3.0.0 但在 22 秒后,我收到连接超时:连接错误。我的连接速度很慢,我使用了代理。我从 sdk 工具安装了 google play services 版本 46 和 Google repository 版本 23.0.0。我该如何解决我的问题?我如何向我的项目添加 google 播放服务?

您可以按照thread中的步骤进行操作。尝试将Android Studio 中的代理设置更改为手动代理并输入公司代理。

File -> Settings -> Appearance & Behavior -> System Settings -> HTTP Proxy -> check Manual proxy configurations. Enter the proxy -> click apply

Note** Check the connection after entering the manual proxy by clicking on Check Connection.

按照此 documentation 中有关如何使用 Google Play 服务 SDK 设置您的项目的步骤进行操作。