Saturday, 27 August 2022

NullPointerException at ActivityTransitionCoordinator.checkMatrixAgain Xiaomi with Android 12

Getting a lot of crashes when starting an activity for Xiaomi devices with Android 12 here is the crash log:

Fatal Exception: java.lang.NullPointerException: Attempt to read from field 'int android.graphics.Rect.left' on a null object reference
   at android.app.ActivityTransitionCoordinator.checkMatrixAgain(ActivityTransitionCoordinator.java:897)
   at android.app.ActivityTransitionCoordinator.moveSharedElementsToOverlay(ActivityTransitionCoordinator.java:878)
   at android.app.ExitTransitionCoordinator.startExit(ExitTransitionCoordinator.java:210)
   at android.app.ActivityTransitionState.startExitOutTransition(ActivityTransitionState.java:393)
   at android.app.Activity.cancelInputsAndStartExitTransition(Activity.java:5550)
   at android.app.Activity.startActivityForResult(Activity.java:5526)
   at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:675)
   at com.sample.myApp.MainActivity$4.onClick(MainActivity.java:222)

this log reported on every place I start for activity the crash above happens through this click

      public void onClick(View v) {
    Intent editIntent = new Intent(MainActivity.this, EditActivity.class);
    editIntent.putExtra(EDITING, true);
    startActivityForResult(editIntent, EDIT_REQUEST);
  }

Crashlytics report



from NullPointerException at ActivityTransitionCoordinator.checkMatrixAgain Xiaomi with Android 12

No comments:

Post a Comment