Does anyone know how to fix Crash Activity Manager?

I have two actions that have a GoogleAPIClient that is used to log in. Now what happens when I switch to the 2nd action using the first action, then I enter the 1st action, which is the only one on the screen, the application crashes. When I do not move from one activity to another, nothing falls. Coincidentally, this only happens during the first action. I went from the 1st-2nd-2nd, and then entered the 2nd asset, and it did not work.

Here is my LogCat:

09-09 14:03:32.192 968-13080/? A/ActivityManager﹕ Activity Manager Crash java.lang.IllegalArgumentException at com.android.server.am.ActivityManagerService.isTopOfTask(ActivityManagerService.java:11223) at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:1629) at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2606) at com.android.server.am.ActivityManagerServiceEx.onTransact(ActivityManagerServiceEx.java:448) at android.os.Binder.execTransact(Binder.java:446) 09-09 14:03:32.200 31715-31715/<MyPackage> E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: <MyPackage>, PID: 31715 java.lang.IllegalArgumentException at android.os.Parcel.readException(Parcel.java:1544) at android.os.Parcel.readException(Parcel.java:1493) at android.app.ActivityManagerProxy.isTopOfTask(ActivityManagerNative.java:4517) at android.app.Activity.isTopOfTask(Activity.java:5448) at android.app.Activity.startActivityForResult(Activity.java:3857) at android.app.Activity.startActivity(Activity.java:4090) 

I think it crashes in this line of code in my util class, which initializes an action with animation

 public static void startActivityWithAnimations(Activity activity, Intent intent, AnimationUtils.ANIM_STYLE animationStyle) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Bundle animation = ActivityOptions.makeSceneTransitionAnimation(activity).toBundle(); **activity.startActivity(intent, animation);** } else { activity.startActivity(intent); activity.overridePendingTransition(animationStyle.getEnterAnim(), animationStyle.getExitAnim()); } } 

Looking at the Activity class, I think it crashes in this line of code:

 private boolean isTopOfTask() { try { **return ActivityManagerNative.getDefault().isTopOfTask(mToken);** } catch (RemoteException e) { return false; } } 
+5
source share

All Articles