ClassCastException: android.os.BinderProxy could not be added

I get this ClassCaseException -

/ActivityManager(213): Bad activity token: android.os.BinderProxy@420b43f0
W/ActivityManager(213): java.lang.ClassCastException: android.os.BinderProxy cannot be cast to 
com.android.server.am.ActivityRecord$TokenW/ActivityManager(213): at 
com.android.server.am.ActivityRecord.forToken(ActivityRecord.java:295)
W/ActivityManager(213): at com.android.server.am.ActivityManagerService.configureSoftkeysActivity(ActivityManagerService.java:15095)
W/ActivityManager(213): at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:1572)W/ActivityManager(213):     at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1646)
W/ActivityManager(213): at android.os.Binder.execTransact(Binder.java:338)
W/ActivityManager(213): at dalvik.system.NativeStart.run(Native Method)

Does anyone have any idea why I am getting this exception. Thanks in advance.

+5
source share
2 answers

I know that he is old, but thought that I would answer, because I only decided it myself. This (for me) is due to the presence of an application manifest android:processin my ad Service. Just uninstall this solution immediately.

Hope this helps someone!

+12
source

If the binding service is running in another process with the caller, you must use the AIDL interface.

+1
source

All Articles