Skip to content

Android targetSdkVersion 36: app is getting closed when using back-button or back-swipe gesture #11001

@felixkrautschuk

Description

@felixkrautschuk

Issue Description

When setting Android targetSdkVersion to 36 (Android 16), I am not able to "navigate back" anymore using the Android back button or the back-swipe gesture, as the app is getting closed (or at least suspended).

screen3.mov

This is not related to NativeScript 9, I already experienced that during some short tests using the NativeScript 8.9 modules some months ago.

Reproduction

Sample app:
ns9test.zip
It's a newly generated NS 9 app, I just added a second page.

  • tap the button to navigate to the second page
  • use the Android back button (or swipe-gesture) to navigate back
    --> app is closed

Relevant log output (if applicable)

Environment

OS: macOS 26.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Shell: /bin/zsh
node: 22.19.0
npm: 11.6.2
nativescript: 9.0.1

# android
java: 17.0.11
ndk: Not Found
apis: 29, 33, 34, 35, 36, 36
build_tools: 25.0.2, 27.0.3, 28.0.3, 29.0.2, 30.0.2, 30.0.3, 32.0.0, 33.0.0, 33.0.1, 33.0.2, 34.0.0, 35.0.0, 35.0.1, 36.0.0, 36.1.0
system_images: 
  - android-29 | Google Play Intel x86_64 Atom
  - android-35 | Google Play Intel x86_64 Atom
  - android-35 | Google Play Tablet Intel x86_64 Atom
  - android-36.1 | Google Play Intel x86_64 Atom
  - android-36.1 | Pre-Release 16 KB Page Size Google Play Intel x86_64 Atom

# ios
xcode: 26.1.1/17B100
cocoapods: 1.16.2
python: 2.7.18
python3: 3.13.0
ruby: 2.6.10
platforms: 
  - DriverKit 25.1
  - iOS 26.1
  - macOS 26.1
  - tvOS 26.1
  - visionOS 26.1
  - watchOS 26.1

Dependencies

"dependencies": {
  "@nativescript/core": "^9.0.5"
},
"devDependencies": {
  "@nativescript/android": "^9.0.0",
  "@nativescript/ios": "^9.0.1",
  "@nativescript/webpack": "^5.0.27"
}

Please accept these terms

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions