当关注 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/