SecurityException:不允许启动服务Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gms (有额外功能)}

问题描述 投票:0回答:3
java android security google-cloud-messaging
3个回答
10
投票

改变

<uses-permission android:name="com.example.manyexampleapp.c2dm.permission.RECEIVE" />

 <!-- This app has permission to register and receive data message. -->
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

您收到异常是因为您尚未定义所需的权限


2
投票

如果应用程序开发后安装了播放服务, 可能会发生

com.google.android.c2dm.permission.RECEIVE
权限已被授予但 android 仍在抱怨同样的错误。

在这种情况下,您必须完全重新安装开发的应用程序才能使此权限发挥作用。


0
投票

我认为你必须检查 Kotlin 版本兼容性。

© www.soinside.com 2019 - 2024. All rights reserved.