如何在gradle中连接库gcm? [英] how to connect the library gcm in gradle?

查看:94
本文介绍了如何在gradle中连接库gcm?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了示例链接



运行它,它工作正常。但现在我想在android studio中做到这一点。我尝试连接库:

  compilecom.google.android.gms:play-services:6.1.71

但类别不可见且包装太多

$ $ $

如何连接gradle中的库GCM?

解决方案

您需要gcm-server.jar。
在build.gradle中添加compile(com.ganyo:gcm-server:1.0.2),如下所示:

依赖关系{
compile(com.ganyo:gcm-server:1.0.2)
}


I downloaded the example link

ran it and it worked fine. but now I want to do it in the android studio. I try to connect the library:

compile "com.google.android.gms:play-services:6.1.71" 

but the classes are not visible and the package too

 android:name="com.google.android.gcm.GCMBroadcastReceiver"

how to connect the library GCM in gradle?

解决方案

You need the gcm-server.jar. Add compile("com.ganyo:gcm-server:1.0.2") in build.gradle as the following:

dependencies { compile("com.ganyo:gcm-server:1.0.2") }

这篇关于如何在gradle中连接库gcm?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆