ResultReceiver.send can only be called from the same library group.

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

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

I get a similar message by calling the ResultReceiver constructor. But the code even works with this error. This began to appear after upgrading the support library version to 25.1.1.

What should I do to get around this?

+7
android android-intentservice receiver
source share
2 answers

There are two separate versions of ResultReceiver. This issue has the support defined in the android.support.v4.os package.

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

+7
source share

I had a similar problem. You just need to update buildToolsVersion to '25 .0.2 'in build.gradle. After I updated the error, I left. clean n build.

+1
source share

All Articles