Repository navigation
Content Sizing Resize called on raster thread #181573
Description
Steps to reproduce
Start the new content sizing sample
Expected results
FlutterView resizes itself.
Actual results
The app crashes sometimes.
Logs
Logs
2026-01-27 15:27:52.280 18860-18882 flutter dev.flutter.example.androidView E [ERROR:flutter/fml/platform/android/jni_util.cc(206)] android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. Expected: main Calling: 1.raster (Ask Gemini)
at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:11023)
at android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:2473)
at android.view.View.requestLayout(View.java:28020)
at android.view.View.requestLayout(View.java:28020)
at android.view.View.requestLayout(View.java:28020)
at android.view.View.requestLayout(View.java:28020)
at android.view.View.requestLayout(View.java:28020)
at android.view.View.requestLayout(View.java:28020)
at androidx.constraintlayout.widget.ConstraintLayout.requestLayout(ConstraintLayout.java:3605)
at android.view.View.requestLayout(View.java:28020)
at androidx.recyclerview.widget.RecyclerView.requestLayout(RecyclerView.java:4927)
at android.view.View.requestLayout(View.java:28020)
at android.view.View.requestLayout(View.java:28020)
at android.view.ViewGroup.onSetLayoutParams(ViewGroup.java:8112)
at android.view.View.setLayoutParams(View.java:20528)
at io.flutter.embedding.android.FlutterView$3.resizeEngineView(FlutterView.java:211)
at io.flutter.embedding.engine.FlutterJNI.maybeResizeSurfaceView(FlutterJNI.java:1335)
Activity
Ensure content-sizing resize is run on UI thread (#181686)
Ensure content-sizing resize is run on UI thread (flutter#181686)
[CP-beta]Ensure content-sizing resize is run on UI thread (#181732)
Ensure content-sizing resize is run on UI thread (flutter#181686)
Ensure content-sizing resize is run on UI thread (flutter#181686)
github-actions commentedon Feb 13, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.Ensure content-sizing resize is run on UI thread (flutter#181686)
Ensure content-sizing resize is run on UI thread (#181686)