NativeScript 应用程序在 Android 设备上导航时运行缓慢并冻结,但在 iOS 上运行良好



我已经用尽了网上提供的任何建议。 我试过在包中设置标记模式.json

"android": {
"markingMode": "none"
}

我已经尝试了几种加载视图模型的方法。 我尝试保存到物理文件并从中读取。 我尝试将每个视图之前的 json 数据加载到应用程序设置中。

我尝试卸载 sass 插件侧抽屉插件。 我已经更新了所有插件,包括核心组件。

以下是插件/版本

nativescript-appversion          │ ^1.4.1  │ │
nativescript-iqkeyboardmanager   │ ^1.4.0  │ │
nativescript-keyboard-toolbar    │ ^1.0.4  │ │
nativescript-local-notifications │ ^3.1.0  │ │
nativescript-orientation         │ ^2.2.1  │ │ 
nativescript-pager               │ ^9.3.14 │ │ 
nativescript-plugin-firebase     │ ^8.0.0  │ │
nativescript-pulltorefresh       │ ^2.2.0  │ │
nativescript-social-share        │ ^1.5.1  │ │ 
nativescript-sound               │ ^1.0.4  │ │ 
nativescript-ui-sidedrawer       │ ^6.0.0  │ │
nativescript-windowed-modal      │ ^5.0.6  │ │ 
rxjs                             │ ^6.3.3  │ │ 
tns-core-modules                 │ ^5.2.2

应用程序应该能够导航不同的视图,而不会冻结或减慢速度。

我面临着完全相同的问题。在/src/package.json上使用以下配置,而不是在主包.json 中使用。

{
"main": "main.js",
"android": {
"v8Flags": "--expose_gc",
"markingMode": "none"
}
}

更多信息在这里: https://www.nativescript.org/blog/markingmode-none-is-official-boost-android-performance-while-avoiding-memory-issues

最新更新