我有一个应用程序在prod环境中运行,最近我看到很多针对C2DM_REGISTERED的RuntimExceptions和C2DM_ERROR。这真是令人沮丧,因为它导致了 应用程序在生产环境中崩溃。我试图至少确定它是否是一个错误 在worklight本机api或我的应用程序中,以便我可以启动修复程序。我们是 使用worklight版本6.0.0.20131129-1705。有关详细信息,我们在设备上使用推送通知,它们正常工作。
这里是两个例外的堆栈跟踪:
java.lang.RuntimeException: Error receiving broadcast Intent
{ act=com.x.y.z.C2DM_REGISTERED
flg=3D0x10 (has extras) } in com.worklight.wlclient.api.WLPush$3@42c503e8
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:778)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5493)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit=
.java:1209)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1025)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalArgumentException: Receiver not registered: com=
.worklight.wlclient.api.WLPush$3@42c503e8
at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:667)
at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1758)
at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java=
:475)
at com.worklight.wlclient.api.WLPush$3.onReceive(WLPush.java:385)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:768)
... 9 more
java.lang.RuntimeException: Error receiving broadcast Intent
{ act=x.y.z.C2DM_ERROR flg=3D0x10 (has extras) } in
com.worklight.wlclient.api.WLPush$4@43253ff0
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:778)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5493)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit=
.java:1209)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1025)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalArgumentException: Receiver not registered: com=
.worklight.wlclient.api.WLPush$3@43266650
at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:667)
at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1758)
at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java=
:475)
at com.worklight.wlclient.api.WLPush$4.onReceive(WLPush.java:407)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:768)
... 9 more
答案 0 :(得分:0)
您忘记在func paused(){
self.scene?.view?.paused = true
pause.removeFromParent()
}
// PLAYING FUNCTION
func playing(){
self.scene?.view?.paused = false
play.removeFromParent()
}
中添加此权限。
AndroidManifest.xml