Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

ErrorReportActivity draws under the status bar on targetSdk 35 (forced edge-to-edge)

Aberta
#2,053 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
76/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
android, java, xml
Domínio
mobile

Direção de pesquisa

Start with framework/app/src/debug/res/layout/error_activity.xml and framework/app/src/debug/java/com/tns/ErrorReportActivity.java, then follow ErrorReport.buildUI(). Reproduce the crash screen on an API 35 emulator and inspect the existing window setup. Done means the errorException banner is fully below the status bar while the debug crash screen still renders correctly.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

  1. ns run android on an API 35 emulator/device (template already sets targetSdkVersion 35)
  2. Throw an uncaught JS exception (e.g. throw new Error('...') on startup)
  3. 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.

Linguagem predominante
C++
Estrelas
563
Forks
144
Merge médio
10h 45min
PRs com merge (30d)
11

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de NativeScript/android

Todas as issues de NativeScript/android

Issues semelhantes

Mais issues de C++

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.