Issue Description
When trying to start our app in Android 10, the app crashes with the error:
System.err: Error: java.lang.NoSuchMethodError: no non-static method "Landroid/view/Window;.getInsetsController()Landroid/view/WindowInsetsController;"
System.err:
This appears to be because of a line in core/ui/core/view/index.android.ts
|
const controller = window.getInsetsController?.(); |
This line tries to get the controller outside of the version check, and even though it uses the optional ?, it appears to be trying to access the native function (which doesn't exist before API 30).
I think the fix is to make the version check before trying to get the inset controller. (I tried this and it works.)
Issue Description
When trying to start our app in Android 10, the app crashes with the error:
This appears to be because of a line in core/ui/core/view/index.android.ts
NativeScript/packages/core/ui/core/view/index.android.ts
Line 1332 in 4da6238
This line tries to get the controller outside of the version check, and even though it uses the optional ?, it appears to be trying to access the native function (which doesn't exist before API 30).
I think the fix is to make the version check before trying to get the inset controller. (I tried this and it works.)