Repository navigation
Description
Steps to reproduce
This is currently production evidence rather than a local public repro project.
The crash occurs during Android app startup in Flutter's embedding stack:
io.flutter.view.AccessibilityBridge.setBoldTextFlagio.flutter.view.AccessibilityBridge.<init>io.flutter.embedding.android.FlutterView.attachToFlutterEngineio.flutter.embedding.android.FlutterActivity.onCreate
Expected results
Flutter should safely determine whether bold text accessibility is enabled, or gracefully treat the feature as unavailable on runtimes where the field access is unsafe.
Actual results
The app crashes at startup with:
java.lang.NoSuchFieldError - No field fontWeightAdjustment of type I in class Landroid/content/res/Configuration; or its superclasses
Production evidence
From Firebase Crashlytics for a Flutter app pinned to Flutter 3.41.x:
- 95 fatal events in the last 90 days for the same issue
- 100%
OnePlus (OnePlus8Pro) - 100%
Android (11) - sampled events from app versions
9.4.2,9.4.4,9.4.7, and9.4.13all show the same main-thread stack landing inAccessibilityBridge.setBoldTextFlag
Representative stack:
io.flutter.view.AccessibilityBridge.setBoldTextFlag
io.flutter.view.AccessibilityBridge.<init>
io.flutter.embedding.android.FlutterView.attachToFlutterEngine
io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onCreateView
io.flutter.embedding.android.FlutterActivity.createFlutterView
io.flutter.embedding.android.FlutterActivity.onCreate
Why this looks like an embedding bug
The current engine code reads Configuration.fontWeightAdjustment directly inside AccessibilityBridge.setBoldTextFlag().
AndroidX Compose hardened this exact access pattern in July 2024:
- https://android.googlesource.com/platform/frameworks/support/+/f7d312d582a3734cd8d648b3b2df81a885f9c0aa
- commit message:
Improve fontWeightAdjustment @RequiresApi guards
That change moved the field access behind a dedicated API-31 helper rather than reading it directly in the main code path.
So this seems less like app code misuse and more like an embedding/runtime compatibility issue where the direct field reference is unsafe on at least some Android 11 / vendor runtimes.
Proposed direction
Mirror the AndroidX pattern in AccessibilityBridge:
- move the
fontWeightAdjustmentaccess behind a@RequiresApi(31)helper - ideally mark the helper
@DoNotInline - optionally treat
NoSuchFieldErroras "bold text unsupported" instead of crashing
Flutter doctor
Not attached because this is not from a local reproducible app sample yet.
I can provide a minimal patch against flutter/engine if helpful.
Activity
[-]Android startup crash in AccessibilityBridge when reading Configuration.fontWeightAdjustment[/-][+][Android][Accessibility] Startup crash in AccessibilityBridge when reading Configuration.fontWeightAdjustment[/+]Guard fontWeightAdjustment access in AccessibilityBridge
Guard fontWeightAdjustment access in AccessibilityBridge
mbcorona commentedon Mar 30, 2026
Hi @lukemmtt, thanks for this report and for sharing the crash logs, and also for taking the team to open a PR.
Routing to team accessibility for evaluation.
lukemmtt commentedon Mar 30, 2026
Sure thing, thanks for the routing!
chunhtai commentedon Apr 1, 2026
Response from AI assistant:
I have triaged this issue.
fontWeightAdjustmenton a platform where it is missing or problematic.AccessibilityBridge.java).fontWeightAdjustmentaccess to a helper method and catchesNoSuchFieldErrorto fall back gracefully.Catch NoSuchFieldError in AccessibilityBridge.setBoldTextFlag
Fix AccessibilityBridge startup crash on vendor-modified Android (flu…
Fix AccessibilityBridge startup crash on vendor-modified Android (flu…
github-actions commentedon Jul 14, 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.Fix AccessibilityBridge startup crash on vendor-modified Android (flu…
[stable] Fix AccessibilityBridge startup crash on vendor-modified And…
[stable] Fix AccessibilityBridge startup crash on vendor-modified And…