简体   繁体   English

导航回MvxTabsFragmentActivity时,应用程序崩溃

[英]App crashes when navigating back to MvxTabsFragmentActivity

My Apps keeps crashing when navigating back to my MvxTabsFragmentActivity. 导航回我的MvxTabsFragmentActivity时,我的应用程序不断崩溃。

The MvxTabsFragmentActivity consists of 4 tabs all being the same type of Fragement loading the same View but with different ViewModels. MvxTabsFragmentActivity包含4个选项卡,它们都是加载相同View但具有不同ViewModel的相同类型的Fragement。 The Fragements show a simple MvxListView with a command attached that opens a new ViewModel. Fragements显示一个简单的MvxListView,附带一个命令,打开一个新的ViewModel。

When navigating back the App crashes. 导航回应用程序崩溃时。 logging with that: 记录:

03-04 16:07:09.530 I/ActivityManager( 414): Displayed MobileVision.Droid/MyApp.droid.views.SecondView: +5s373ms 03-04 16:07:09.530 I / ActivityManager(414):显示的MobileVision.Droid / MyApp.droid.views.SecondView:+ 5s373ms

03-04 16:07:10.870 I/mono-stdout( 2192): mvx:Diagnostic: 71.48 No view model association found for candidate view MyListFragment 03-04 16:07:10.870 I / mono-stdout(2192):mvx:Diagnostic:71.48找不到候选视图的视图模型关联MyListFragment

03-04 16:07:10.942 I/mono-stdout( 2192): mvx:Diagnostic: 71.58 No view model association found for candidate view MyListFragment 03-04 16:07:10.942 I / mono-stdout(2192):mvx:Diagnostic:71.58找不到候选视图的视图模型关联MyListFragment

03-04 16:07:11.010 I/mono-stdout( 2192): mvx:Diagnostic: 71.61 No ViewModel class specified for MyListFragment in LoadViewModel 03-04 16:07:11.010 I / mono-stdout(2192):mvx:Diagnostic:71.61在LoadViewModel中没有为MyListFragment指定ViewModel类

03-04 16:07:11.386 I/Choreographer( 414): Skipped 32 frames! 03-04 16:07:11.386 I / Choreographer(414):跳过32帧! The application may be doing too much work on its main thread. 应用程序可能在其主线程上做了太多工作。

03-04 16:07:20.798 W/ActivityManager( 414): Launch timeout has expired, giving up wake lock! 03-04 16:07:20.798 W / ActivityManager(414):启动超时已过期,放弃唤醒锁定!

03-04 16:07:20.818 E/WindowManager( 414): Starting window AppWindowToken{5292ce60 token=Token{52c32c18 ActivityRecord{529a544c u0 MyApp.Droid/MyApp.droid.views.FirsViewModelView t9}}} timed out 03-04 16:07:20.818 E / WindowManager(414):启动窗口AppWindowToken {5292ce60 token = Token {52c32c18 ActivityRecord {529a544c u0 MyApp.Droid / MyApp.droid.views.FirsViewModelView t9}}}超时

Anyone any solution/idea where to search? 任何解决方案/想法在哪里搜索? Because no exceptions are thrown anywhere.. :-( 因为在任何地方都没有抛出异常.. :-(

PS: I build exactly the same clean and simple setup like FragmentSample, but then with a simple MvXListView in the Fragment to navigate to a new screen. PS:我构建了与FragmentSample完全相同的简洁设置,但随后在Fragment中使用简单的MvXListView导航到新屏幕。

EDIT: - made logging litle more readable 编辑: - 使日志记录更具可读性
- exceptions seems to happen with following scenario: - 以下情况似乎发生异常:

  1. OpenApp OpenApp
  2. Navigate to other TAB 导航到其他TAB
  3. Navigate to new activity (by Button or ListViewItem, doesn't matter) 导航到新活动(通过Button或ListViewItem,无关紧要)
  4. Navigate Back 导航回来
  5. Crash / or repeat step 3 & 4 崩溃/或重复步骤3和4

NOTE: when NOT doing step 2 (switch TAB) it seems the App won't Crash 注意:当不执行步骤2(切换TAB)时,应用程序似乎不会崩溃

answer came from @Stuart ; 答案来自@Stuart; fixes in https://github.com/MvvmCross/MvvmCross/pull/915 修复了https://github.com/MvvmCross/MvvmCross/pull/915

Currently NuGet package for FullFragging isn't working yet, need to build the FullFragging dll yourself for now. 目前用于FullFragging的NuGet包还没有工作,现在需要自己构建FullFragging dll。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM