Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ResultReceiver.send can only be called from same library group

I have an IntentService that is using android.support.v4.os.ResultReceiver to pass data. In the IntentService, when I use ResultReceiver.send method to send the result back, Android Studio shows an error saying

ResultReceiver.send can only be called from same library group (groupId=com.android.support)

I get a similar message while calling the constructor of ResultReceiver. But the code runs even with this error. This started showing up after I upgraded support library version to 25.1.1.

What am I supposed to do to get around this?

like image 289
kp91 Avatar asked Mar 14 '17 13:03

kp91


Video Answer


1 Answers

There are two separate versions of ResultReceiver. The support one defined in android.support.v4.os package has this issue.

For a quick fix, use the standard ResultReceiver defined in android.os package.

like image 139
Sahil Patel Avatar answered Oct 06 '22 00:10

Sahil Patel