在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)="onClickRoom($event.view.bindingContext)">
<template let-item="item">
<Label [text]="item"></Label>
</template>
</ListView>
component.ts
onClickRoom(abc: string) {
this.date = new Date();
this.eventArray = appSettings.getString('itemsArray') || [];
this.eventArray.push(this.evntList);
appSettings.setString("itemsArray", JSON.stringify(this.eventArray));
}
它在iOS上运行良好,只在Android上运行。我该如何解决这个问题?任何帮助都会非常有用。