添加 google-services Gradle 插件后无法同步 Gradle 项目

Failed to sync Gradle project after adding google-services Gradle plugin

我正在向我的应用程序添加 Google 分析,并且我正在关注官方文档。

将以下行添加到 build.gradle 后:

classpath 'com.google.gms:google-services:2.0.0-beta2'

我收到以下错误消息:

Error:Cause: failed to find target with hash string 'Google Inc.:Google APIs:23' in: C:\Users\MY_USER\AppData\Local\Android\sdk

我的app\build.gradle:

apply plugin: 'com.google.gms.google-services'
...
android {
compileSdkVersion 'Google Inc.:Google APIs:23'
...
targetSdkVersion 23

从 \build.gradle 中删除类路径行会同步项目。

如有任何建议,我们将不胜感激。

编辑:添加了目标 sdk 版本

Edit2:根据@Tiem Song 的回答,Google Anayltics 库似乎无法与 Google Inc. 一起使用:Google APIs:23 仅使用 API 23 个作品。

compileSdkVersion 'Google Inc.:Google APIs:23'

应改为:

compileSdkVersion 23