java.lang.SecurityException:权限拒绝:来自pid = 1484,uid = 10151(需要uid = 1000)的getIntentSender()

编程入门 行业动态 更新时间:2024-10-18 16:51:54
本文介绍了java.lang.SecurityException:权限拒绝:来自pid = 1484,uid = 10151(需要uid = 1000)的getIntentSender()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在使用Android 4.4.2

I am getting this error specifically on HTC DESIRE 626GPLUS DUAL SIM with Android 4.4.2

java.lang.SecurityException: Permission Denial: getIntentSender() from pid=1484, uid=10151, (need uid=1000) is not allowed to send as package android at android.os.Parcel.readException(Parcel.java:1472) at android.os.Parcel.readException(Parcel.java:1426) at android.app.INotificationManager$Stub$Proxy.cancelAllNotifications(INotificationManager.java:271) at android.app.NotificationManager.cancelAll(NotificationManager.java:220) at com.bakar.GcmIntentService.onHandleIntent(GcmIntentService.java:92) at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:193) at android.os.HandlerThread.run(HandlerThread.java:61)

推荐答案

尝试将try-catch添加到您的代码中,如下所示:

Try adding a try-catch to your code, like this :

NotificationManager nMgr = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); try { nMgr.cancelAll(); } catch (Exception e) { e.printStackTrace(); }

您提到的设备型号可能不支持

作为cancelAll().

as cancelAll() may not be supported by the device model you mentioned.

更多推荐

java.lang.SecurityException:权限拒绝:来自pid = 1484,uid = 10151(需要uid = 1000)的getInten

本文发布于:2023-11-27 04:01:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1636497.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:权限   pid   SecurityException   java   lang

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!