WARN/ActivityManager(5038): Permission denied: che

2019-01-20 08:57发布

问题:

From one application I am (broadcast) sending an intent to a broadcastreceiver of another one. I am getting the error:

WARN/ActivityManager(5038): Permission denied: checkComponentPermission

回答1:

You need to add permission under your manifest file add these

<receiver android:name=".YourBroadCastReceiverName" android:exported="true"></receiver>


回答2:

The solution is to add android:exported="true" to the activity that will be invoked by the intent. Adding it to the receiver, as suggested by another answer, did not work for me, but adding it to the activity did.



回答3:

Herschel said: " the problem was in the manifest file of the application where the BroadcastReceiver was defined: android:exported should be defined as true"