gpt4 book ai didi

android - 需要帮助阅读 Android Stacktrace for Mvvmcross fragment crash

转载 作者:行者123 更新时间:2023-11-29 01:24:14 24 4
gpt4 key购买 nike

在 Google Play 控制面板上,我遇到了大量崩溃和 ANR。他们有以下堆栈跟踪:

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
... 1 more
Caused by: md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable: System.NullReferenceException: Object reference not set to an instance of an object
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x00028>
at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,intptr,intptr) <0x000db>
at Android.App.Activity.OnStart () <0x00103>
at Cirrious.MvvmCross.Droid.Fragging.MvxEventSourceFragmentActivity.OnStart () <0x00013>
at Android.App.Activity.n_OnStart (intptr,intptr) <0x00037>
at (wrapper dynamic-method) object.ecfa86e9-900d-479e-9875-6960304e8202 (intptr,intptr) <0x0003b>
at md526035c37b8d1573464bb4caa888f0f5d.MvxEventSourceFragmentActivity.n_onStart(Native Method)
at md526035c37b8d1573464bb4caa888f0f5d.MvxEventSourceFragmentActivity.onStart(MvxEventSourceFragmentActivity.java:78)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1234)
at android.app.Activity.performStart(Activity.java:6329)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2767)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1449)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5951)

我熟悉堆栈跟踪,但对于这个特定的跟踪,我不知道该去哪里寻找。

这些错误发生在各种设备上,4.* 和 5.*。我也尝试重现这个错误,但没有成功。

也许这是我可以忽略的特定 Android 问题?

Xamarin:4.0.0.1717Xamarin.Android:6.0.0.35

编辑 1

我找到了 bugzilla item .它显示了一些相同的问题。此项涉及 Xamarin Forms。我不使用 Xamarin Forms,但我已采取措施重现该错误:

  1. 启动应用
  2. 将应用置于后台
  3. 停止进程(使用 Android 设备管理器)
  4. 启动应用

然后我也得到了这个错误:

FATAL EXCEPTION: main
Process: com.android.MyApp, PID: 4228
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
... 1 more
Caused by: md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable: System.NullReferenceException: Object reference not set to an instance of an object
at MyApp.Android.Views.Framents.MessageListFragment.OnCreateView (Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Android.OS.Bundle savedInstanceState) [0x003a2] in <filename unknown>:0
at Android.Support.V4.App.Fragment.n_OnCreateView_Landroid_view_LayoutInflater_Landroid_view_ViewGroup_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_inflater, IntPtr native_container, IntPtr native_savedInstanceState) [0x00022] in <filename unknown>:0
at (wrapper dynamic-method) System.Object:85227a30-9274-46c5-a910-dd5907ec83c7 (intptr,intptr,intptr,intptr,intptr)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <filename unknown>:0
at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (IntPtr jobject, IntPtr jclass, IntPtr jmethod) [0x00089] in <filename unknown>:0
at Android.App.Activity.OnStart () [0x00079] in <filename unknown>:0
at Cirrious.MvvmCross.Droid.Fragging.MvxEventSourceFragmentActivity.OnStart () [0x00000] in <filename unknown>:0
at Android.App.Activity.n_OnStart (IntPtr jnienv, IntPtr native__this) [0x00009] in <filename unknown>:0
at (wrapper dynamic-method) System.Object:5c6d4542-2710-4e67-976d-a6e9d1ccd51c (intptr,intptr)
at md526035c37b8d1573464bb4caa888f0f5d.MvxEventSourceFragmentActivity.n_onStart(Native Method)
at md526035c37b8d1573464bb4caa888f0f5d.MvxEventSourceFragmentActivity.onStart(MvxEventSourceFragmentActivity.java:78)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1236)
at android.app.Activity.performStart(Activity.java:6006)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2288)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
... 4 more

最佳答案

我以前见过这种情况。我建议使用 MvxCachingFragmentCompatActivity 来让它处理 Activity 生命周期情况。你可以在这里找到一个例子:https://github.com/MvvmCross/MvvmCross-AndroidSupport/tree/master/Samples

关于android - 需要帮助阅读 Android Stacktrace for Mvvmcross fragment crash,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34990908/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com