Android nativescript插件firebase云消息应用程序在前台点击消息时崩溃

Android nativescript插件firebase云消息应用程序在前台点击消息时崩溃,android,angular2-nativescript,Android,Angular2 Nativescript,我使用nativescript插件firebase进行云消息传递 在android上,如果我在应用程序在后台运行或关闭时收到消息,并点击消息(通知),应用程序将打开 但是,如果消息到达,我手动打开应用程序,然后点击消息,则应用程序崩溃 换句话说,只有在应用程序运行时点击消息,应用程序才会崩溃 An uncaught Exception occurred on "main" thread. Unable to destroy activity {kidcare.technology/com.tns

我使用nativescript插件firebase进行云消息传递

在android上,如果我在应用程序在后台运行或关闭时收到消息,并点击消息(通知),应用程序将打开

但是,如果消息到达,我手动打开应用程序,然后点击消息,则应用程序崩溃

换句话说,只有在应用程序运行时点击消息,应用程序才会崩溃

An uncaught Exception occurred on "main" thread.
Unable to destroy activity {kidcare.technology/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onDestroy failed
Error: View not added to this instance. View: GridLayout(3) CurrentParent: undefined ExpectedParent: Page(2)

StackTrace:
java.lang.RuntimeException: Unable to destroy activity {kidcare.technology/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onDestroy failed
Error: View not added to this instance. View: GridLayout(3) CurrentParent: undefined ExpectedParent: Page(2)
    at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5001)
    at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5030)
    at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:44)
    at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2040)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:224)
    at android.app.ActivityThread.main(ActivityThread.java:7520)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Caused by: com.tns.NativeScriptException: Calling js method onDestroy failed
Error: View not added to this instance. View: GridLayout(3) CurrentParent: undefined ExpectedParent: Page(2)
    at com.tns.Runtime.callJSMethodNative(Native Method)
    at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1286)
    at com.tns.Runtime.callJSMethodImpl(Runtime.java:1173)
    at com.tns.Runtime.callJSMethod(Runtime.java:1160)
    at com.tns.Runtime.callJSMethod(Runtime.java:1138)
    at com.tns.Runtime.callJSMethod(Runtime.java:1134)
    at com.tns.NativeScriptActivity.onDestroy(NativeScriptActivity.java:39)
    at android.app.Activity.performDestroy(Activity.java:8181)
    at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1342)
    at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4986)
    ... 11 more

我通过将AndroidManifest.xml中的android:launchMode更改为“singleTop”来修复它,删除了platform>android文件夹并重建应用程序。我通过将AndroidManifest.xml中的android:launchMode更改为“singleTop”来修复它,删除了platform>android文件夹并重建应用程序