0
我有這個錯誤,我試圖設置一個斷點,但無法找到我的代碼的哪一部分導致了問題。當我按下後退按鈕以離開應用程序時,會發生此問題。下面的堆棧跟蹤沒有顯示任何我的代碼。有沒有人在之前看到過這個問題,或者我該如何調試這種類型的問題。Xamarin PCL IllegalStateException當按下按鈕外出應用程序
Java.Lang.IllegalStateException: Activity has been destroyed
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() [0x0000c] in /Users/builder/data/lanes/3511/77cb8568/source/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at Java.Interop.JniEnvironment+InstanceMethods.CallIntMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method) [0x00084] in /Users/builder/data/lanes/3511/ce955cc0/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:11464
at Android.Runtime.JNIEnv.CallIntMethod (System.IntPtr jobject, System.IntPtr jmethod) [0x00000] in /Users/builder/data/lanes/3511/ce955cc0/source/monodroid/src/Mono.Android/JNIEnv.g.cs:186
at Android.Support.V4.App.FragmentTransactionInvoker.CommitAllowingStateLoss() [0x00033] in <27c17fe440cf491ba8255bcefade6e02>:0
at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailContainer.Dispose (System.Boolean disposing) [0x00042] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailContainer.cs:130
at Java.Lang.Object.Dispose() [0x00000] in /Users/builder/data/lanes/3511/ce955cc0/source/xamarin-android/src/Mono.Android/Java.Lang/Object.cs:203
at Xamarin.Forms.Platform.Android.AppCompat.MasterDetailPageRenderer.Dispose (System.Boolean disposing) [0x00046] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailPageRenderer.cs:192
at Java.Lang.Object.Dispose() [0x00000] in /Users/builder/data/lanes/3511/ce955cc0/source/xamarin-android/src/Mono.Android/Java.Lang/Object.cs:203
at Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPage (Xamarin.Forms.Page newRoot) [0x0003f] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:226
at Xamarin.Forms.Platform.Android.AppCompat.Platform.Dispose() [0x00010] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:52
at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.OnDestroy() [0x0002f] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:195
at Android.App.Activity.n_OnDestroy (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in /Users/builder/data/lanes/3511/ce955cc0/source/monodroid/src/Mono.Android/platforms/android-24/src/generated/Android.App.Activity.cs:2981
at at (wrapper dynamic-method) System.Object:3a1f2dcb-839c-41c3-88f3-3ca5ed8f0b6f (intptr,intptr)
at java.lang.IllegalStateException: Activity has been destroyed
at at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1515)
at at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:638)
at at android.support.v4.app.BackStackRecord.commitAllowingStateLoss(BackStackRecord.java:621)
at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.FormsAppCompatActivity.n_onDestroy(Native Method)
at at md5b60ffeb829f638581ab2bb9b1a7f4f3f.FormsAppCompatActivity.onDestroy(FormsAppCompatActivity.java:80)
at at android.app.Activity.performDestroy(Activity.java:5603)
at at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1135)
at at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3670)
at at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3701)
at at android.app.ActivityThread.access$1500(ActivityThread.java:161)
at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1318)
at at android.os.Handler.dispatchMessage(Handler.java:102)
at at android.os.Looper.loop(Looper.java:157)
at at android.app.ActivityThread.main(ActivityThread.java:5356)
at at java.lang.reflect.Method.invokeNative(Native Method)
at at java.lang.reflect.Method.invoke(Method.java:515)
at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at at dalvik.system.NativeStart.main(Native Method)
你看過https://bugzilla.xamarin.com/show_bug.cgi?id=38596& https://bugzilla.xamarin.com/show_bug.cgi?id=46494 – SushiHangover