Android “上发生了未捕获的异常”;“主要”;线
在Android上运行nativescript应用程序时,我遇到以下错误:Android “上发生了未捕获的异常”;“主要”;线,android,nativescript,Android,Nativescript,在Android上运行nativescript应用程序时,我遇到以下错误: An uncaught Exception occurred on "main" thread. JS: com.tns.NativeScriptException: JS: Calling js method onItemClick failed JS: JS: [object Object] tns.html <ListView [items]="abc$ | async" (itemTap)="onCl
An uncaught Exception occurred on "main" thread.
JS: com.tns.NativeScriptException:
JS: Calling js method onItemClick failed
JS:
JS: [object Object]
tns.html
<ListView [items]="abc$ | async" (itemTap)="onClickRoom($event.view.bindingContext)">
<template let-item="item">
<Label [text]="item"></Label>
</template>
</ListView>
它在iOS上运行良好,而且只在Android上运行。我如何解决这个问题?任何帮助都会非常有用。点击处理程序的代码片段和更多的上下文将允许我们实际帮助您。好的。我包括我的html和组件文件。我想你还没有包括onClickRoom的实现。包括的函数名是onClickRoom
onClickRoom(abc: string) {
this.date = new Date();
this.eventArray = appSettings.getString('itemsArray') || [];
this.eventArray.push(this.evntList);
appSettings.setString("itemsArray", JSON.stringify(this.eventArray));
}