简体   繁体   English

在Android SDK管理器中找不到Google云消息传递(GCM)库

[英]Google cloud messaging (GCM) library not found in Android SDK manager

我想在我的android应用程序中实现推送通知。所以我想从android SDK管理器安装Google云消息传递库,但我在sdk管理器的Extras部分中看不到它。有人建议更新sdk管理器将使其他人建议您不要使用GCM库,而我只需要使用Google Play服务库。两者中的哪一个是正确的,我该如何解决?

您将拥有Google Play服务库。使用该库最适合推送通知

According to the official documentation 根据官方文件

To write your client application, use the GCM APIs. 要编写您的客户端应用程序,请使用GCM API。 To use this API, you must set up your project to use the Google Play services SDK, as described in Setup Google Play Services SDK. 要使用此API,您必须按照设置Google Play服务SDK中的说明,将项目设置为使用Google Play服务SDK。

Caution: When you add the Play Services library to your project, be sure to add it with resources, as described in Setup Google Play Services SDK. 警告:将Play服务库添加到项目中时,请务必按照设置Google Play服务SDK中的说明将其与资源一起添加。 The key point is that you must reference the library—simply adding a .jar file to your Eclipse project will not work. 关键点在于,您必须引用该库—简单地将一个.jar文件添加到Eclipse项目中是行不通的。 You must follow the directions for referencing a library, or your app won't be able to access the library's resources 您必须遵循有关引用库的说明,否则您的应用将无法访问库的资源

Refer this link https://developer.android.com/google/gcm/client.html 引用此链接 https://developer.android.com/google/gcm/client.html

Mark as up if this information is useful for you. 如果此信息对您有用,请标记为“ up”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM