2
我能够将GCM集成到应用程序模块中,但无法集成到库模块中。我在应用程序模块中包含这两行代码。无法将Google Cloud Messaging集成到Android库模块中
apply plugin: 'com.android.library'
apply plugin: 'com.google.gms.google-services'
我在应用程序模块的依赖关系中有这行代码。
compile 'com.google.android.gms:play-services-gcm:8.1.0'
而且这条线是在项目顶层
classpath 'com.google.gms:google-services:1.4.0-beta3'
但是,当我试图通过扩展GcmListenerService实现服务,它是无法检测GcmListenerService。
请给出建议,我试图超过5小时,但无法解决问题。
只要加入'编“com.google.android.gms:播放 - services-gcm:7.5.0''在您的应用程序gradle文件中。没有别的 –
我已经添加了你正在谈论的代码,但没有结果。 – Madhu
删除您添加的任何依赖关系 –