6

我从 google play 上的用户那里得到以下异常:

java.lang.SecurityException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gsf (has extras) } without permission com.google.android.c2dm.permission.RECEIVE

我将我的应用程序上传到市场已经 8 个月了,这是我第一次遇到这个异常。谁能告诉我,这个异常是怎么突然出现的,这是怎么回事。我搜索了网络,但找不到任何东西。请帮忙。

4

1 回答 1

2

由于此服务的清单中没有指定意图过滤器,因此 android:exported 的默认值为 false。当您设置 android:exported="true" 时,其他应用程序将能够启动服务。

http://developer.android.com/guide/topics/manifest/service-element.html#exported

于 2012-10-05T05:51:15.813 回答