【发布时间】:2016-03-17 04:11:17
【问题描述】:
我正在使用 Android Studio 将 GCM 集成到一个项目中,因为我将 google play 服务依赖项添加到 top level gradle 如下 sn-p 代码:
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.google.gms:google-services:1.5.0-beta2' //this one
}
但我收到错误 Failed to find: com.google.android.gms:play-services-gcm:8.3.0 和 Failed to find: com.google.android.gms:play-services-measurement:8.3.0。我已经从 SDK 管理器更新了 goole play 服务并同步了项目。
我也在顶级 gradle 中添加了 apply plugin: 'com.google.gms.google-services',但它仍然显示相同的错误
【问题讨论】:
-
在项目级gradle中添加
apply plugin: 'com.google.gms.google-services' -
我也做过
-
您是否在项目中添加任何播放服务库??
-
你可以按照这里的解释试试stackoverflow.com/questions/30527369/…
-
com.google.gms:google-services:1.5.0 我确定已经发布
标签: android android-studio google-cloud-messaging google-play-services