我发现我的 Mono for Android 应用程序在用户转到 Settings->Apps->MyApp 并选择“清除数据”后每次启动都会崩溃。我使用 Mono for Android“Hello World”应用程序创建了一个新项目,这个应用程序表现出完全相同的行为,这让我假设这发生在我无法控制的单声道堆栈中的某个地方。如果我使用 adb logcat 检查,这是我可以找到的相关行:
I/ActivityManager( 185): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=Test_App.Test_App/test_app.Activity1} from pid 386
D/dalvikvm(18358): Late-enabling CheckJNI
I/dalvikvm(18358): Turning on JNI app bug workarounds for target SDK version 8...
I/ActivityManager( 185): Start proc Test_App.Test_App for activity Test_App.Test_App/test_app.Activity1: pid=18358 uid=10074 gids={3003}
D/dalvikvm( 119): GC_EXPLICIT freed 37K, 3% free 12553K/12867K, paused 1ms+2ms
I/ActivityThread(18358): Pub Test_App.Test_App.mono.MonoRuntimeProvider.__mono_init__: mono.MonoRuntimeProvider
D/dalvikvm(18358): Trying to load lib /data/data/Test_App.Test_App/lib/libmonodroid.so 0x4168ba48
D/dalvikvm(18358): Added shared lib /data/data/Test_App.Test_App/lib/libmonodroid.so 0x4168ba48
D/dalvikvm( 119): GC_EXPLICIT freed <1K, 3% free 12553K/12867K, paused 2ms+2ms
E/mono (18358): WARNING: The runtime version supported by this application is unavailable.
E/mono (18358): Using default runtime: v2.0.50727
D/OpenGLRenderer( 386): Flushing caches (mode 1)
D/dalvikvm( 119): GC_EXPLICIT freed <1K, 3% free 12553K/12867K, paused 1ms+1ms
I/mono (18358): Stacktrace:
I/mono (18358):
D/OpenGLRenderer( 386): Flushing caches (mode 0)
D/Zygote ( 119): Process 18358 terminated by signal (11)
I/ActivityManager( 185): Process Test_App.Test_App (pid 18358) has died.
W/ActivityManager( 185): Force removing ActivityRecord{41a85018 Test_App.Test_App/test_app.Activity1}: app died, no saved state
有人在他的单声道应用程序中有相同的行为吗?有解决办法吗?