推送报 java.lang.SecurityException You need MANAGE_USERS permission to check
2017-12-26 11:23
2807 查看
如果你报错的设备是7.0及以上,使用了推送或其他任何和构建Notification相关。那么请检查你自定义Application中是否有getUserId()方法,如果有请修改此方法名(如修改为:getUserId2()),再试。
因为7.0以上系统构建Notification中会获取Application的原始getUserId方法,从而会引起冲突,Notification构建不成功。对推送通知显示有影响。所有要不能在Application中有getUserId方法。
我就是在使用激光推送时,7.0以上系统无法收到通知发现该问题的。
参考:http://www.cnblogs.com/freedreamnight/p/6485479.html
因为7.0以上系统构建Notification中会获取Application的原始getUserId方法,从而会引起冲突,Notification构建不成功。对推送通知显示有影响。所有要不能在Application中有getUserId方法。
我就是在使用激光推送时,7.0以上系统无法收到通知发现该问题的。
参考:http://www.cnblogs.com/freedreamnight/p/6485479.html
相关文章推荐
- 【原创】android 7.0 通知报错 java.lang.SecurityException: You need MANAGE_USERS permission to: check if specified user a managed profile outside your profile group
- java.lang.SecurityException: No permission to write APN settings问题原因
- Caused by: java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.HEADSET_PLUG
- 异常java.lang.SecurityException: You need MANAGE_USERS permission to……
- Android开发丶Caused by: java.lang.IllegalArgumentException: You need to use a Theme.AppCompat theme (or
- java.lang.SecurityException: No permission to write APN settings问题的定位小结
- java.lang.SecurityException: No permission to write APN settings问题的定位小结
- java.lang.SecurityException: User has not given permission to device UsbDevice
- Java.lang.IllegalArgumentException: You need to use a Theme.AppCompat theme (or descendant) with the
- android java.lang.SecurityException: Permission Denial: not allowed to send broadcast
- Caused by: java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.int
- java.lang.IllegalArgumentException: You need to use a Theme.AppCompat theme (or descendant) with the
- java.lang.SecurityException: Need BLUETOOTH ADMIN permission: Neither user 10047 nor current process
- java.lang.IllegalArgumentException: You need to use a Theme.AppCompat theme (or descendant) with ...
- Caused by: java.lang.SecurityException: Need BLUETOOTH permission
- java.lang.SecurityException: No permission to modify given thread
- Caused by: java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.int
- intent Getting java.lang.SecurityException: Unable to find app for caller android.app.ApplicationThr
- Tesseract 的OSGI环境下面一直报”java.lang.RuntimeException: Need to install JAI Image I/O package.“的解决办法
- java.lang.IllegalArgumentException: you must specify a way to create the tab content