android - 迁移到 Play Services v7.5+ 的新 GCM 协议(protocol)时,无法解析 AndroidManifest.xml 中的 'gcm'

标签 android google-cloud-messaging

当关注 instructions to migrate an existing app 'that extend a WakefulBroadcastReceiver' 时,我收到错误 cannot resolve gcm for com.google.android.gms.gcm.GcmReceiver

最佳答案

Google 省略了说明,以确保如果您正在编译单独的 play-services 包(按照推荐),您需要添加 编译 'com.google.android.gms:play-services-gcm:7.x.x' 到你的 build.gradle

关于android - 迁移到 Play Services v7.5+ 的新 GCM 协议(protocol)时,无法解析 AndroidManifest.xml 中的 'gcm',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32321150/

相关文章:

安卓 6 : App uses more memory each time it's started

android - Android Asset Studio 的启动器图标生成器很小

php - 无法将在手机上运行的 Android 应用程序连接到本地主机

android - 同一设备上的多个应用程序的 GCM 注册 ID 是否唯一?

android - 无法在 Android Studio 中解析符号 'GCMBroadcastReceiver'

java - 在同一 Activity android上使用前后摄像头

Android 应用索引 -> FirebaseAppIndexingInvalidArgumentException

java - 如果数字类似于 $12.5,则在末尾添加 0

在设备上收到 GCM 推送通知时弹出 Android 应用程序

java - 如果 Android 终止了我的应用程序并且我从设置中强制关闭,我会收到 GCM 消息吗?