GCM PhoneGap的插件出错的消息 [英] GCM phonegap plugin Error on message
问题描述
我使用PhoneGap的实现在Android GCM。这个过程是很好,直到我将消息发送到设备。当我的设备接收到它关闭与我的应用程序有一个内部错误消息的消息......该错误消息是Dalvik虚拟机。我还在测试使用中随附的插头演示程序。
I am using phonegap to implement GCM on android. The process works well until I send a message to the device. When my device receives the message it shuts down with the message that my app had an internal error... The error message is from the dalvik VM. I am still testing using the demo app that came in with the plug in.
在LogCat中的错误是:
The error in LogCat is:
活动com.cordova2.gcm.MainActivity渗漏,最初这里注册IntentReceiver com.google.android.gcm.GCMBroadcastReceiver@4a31f700。你缺少unregisterReceiver()的调用?
Activity com.cordova2.gcm.MainActivity has leaked IntentReceiver com.google.android.gcm.GCMBroadcastReceiver@4a31f700 that was originally registered here. Are you missing a call to unregisterReceiver()?
推荐答案
您必须调用这在mainactivity摆脱这个错误的
You have to call this in your mainactivity to get rid of that error
@Override
public void onDestroy() {
GCMRegistrar.onDestroy(this);
super.onDestroy();
}
这篇关于GCM PhoneGap的插件出错的消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!