android - 不能使用 GCMRegistrar?

标签 android google-cloud-messaging

无法使用我已添加到构建路径的 gcm.jar 中的 GCMRegisterar,但我仍然在 logcat 中收到此消息。

07-12 14:29:08.825: I/dalvikvm(23536): Could not find method com.google.android.gcm.GCMRegistrar.getRegistrationId, referenced from method com.example.registration_id.MainActivity.onCreate

最佳答案

您需要创建一个/libs 文件夹并将gcm.jar 复制到其中然后构建它。

关于android - 不能使用 GCMRegistrar?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11448812/

相关文章:

java - 我怎么知道我的 GCM 消息是否足够小 (< 4kb) 可以发送? (如何获取字符串的大小?)

c# - 未传送 GCM 消息

php - 如何从 php 从 android 推送通知

java - 如何使用 DOM 获取 ElementById?

安卓 : How to change animation speed dynamically?

android - 如何在自定义 ListActivity 布局中更改 ImageView 资源?

android - 通知自动取消不调用 DeleteIntent

android - 我们应该使用 lambda 还是匿名类来观察 LiveData

java - 服务数量对应用效率的影响

android - "Upstream Google Cloud Messaging and User Notifications Sign-up"是强制性的吗?