Environment
- CLI: 9.x
- Android Runtime: @nativescript/android 9.1.1 (also verified unchanged in 9.1.2-next.2026-09-22)
- Device: Android 15+ (API 35)
Describe the bug
The debug crash screen (com.tns.ErrorReportActivity) renders its top error banner under the OS status bar when the app targets SDK 35, making the first line of the error message unreadable.
Android 15 forces edge-to-edge for apps with targetSdkVersion 35, so the activity's window draws behind the status bar. The screen has never handled window insets:
framework/app/src/debug/res/layout/error_activity.xml pins errorException (the red message TextView) to the top of the parent RelativeLayout with only paddingVertical=10dp — no android:fitsSystemWindows, no inset margin.
framework/app/src/debug/java/com/tns/ErrorReportActivity.java sets a hardcoded Theme_AppCompat_NoActionBar and ErrorReport.buildUI() calls setContentView with no WindowCompat/OnApplyWindowInsetsListener handling.
To Reproduce
ns run android on an API 35 emulator/device (template already sets targetSdkVersion 35)
- Throw an uncaught JS exception (e.g.
throw new Error('...') on startup)
- The crash screen's first line is obscured by the status bar
Expected behavior
The errorException banner is offset below the status bar.
Possible fix
Add android:fitsSystemWindows="true" to the root RelativeLayout in error_activity.xml, or apply a ViewCompat.setOnApplyWindowInsetsListener in ErrorReport.buildUI() that pads the content by the statusBars inset.
Related: #1833 tracks the same root cause for normal app content, but ErrorReportActivity is a separate plain AppCompatActivity and won't inherit a fix applied to NativeScriptActivity's content view.
Environment
Describe the bug
The debug crash screen (
com.tns.ErrorReportActivity) renders its top error banner under the OS status bar when the app targets SDK 35, making the first line of the error message unreadable.Android 15 forces edge-to-edge for apps with
targetSdkVersion 35, so the activity's window draws behind the status bar. The screen has never handled window insets:framework/app/src/debug/res/layout/error_activity.xmlpinserrorException(the red messageTextView) to the top of the parentRelativeLayoutwith onlypaddingVertical=10dp— noandroid:fitsSystemWindows, no inset margin.framework/app/src/debug/java/com/tns/ErrorReportActivity.javasets a hardcodedTheme_AppCompat_NoActionBarandErrorReport.buildUI()callssetContentViewwith noWindowCompat/OnApplyWindowInsetsListenerhandling.To Reproduce
ns run androidon an API 35 emulator/device (template already setstargetSdkVersion 35)throw new Error('...')on startup)Expected behavior
The
errorExceptionbanner is offset below the status bar.Possible fix
Add
android:fitsSystemWindows="true"to the rootRelativeLayoutinerror_activity.xml, or apply aViewCompat.setOnApplyWindowInsetsListenerinErrorReport.buildUI()that pads the content by thestatusBarsinset.Related: #1833 tracks the same root cause for normal app content, but
ErrorReportActivityis a separate plainAppCompatActivityand won't inherit a fix applied toNativeScriptActivity's content view.