Xamarin Profiler从一开始就使应用程序崩溃

时间:2019-03-08 12:52:33

标签: c# android xamarin xamarin.android mvvmcross

我有一个使用MVVM Cross开发的Xamarin应用程序,我正在尝试对其进行概要分析。

但是,一旦第一个屏幕出现,应用程序就会崩溃。

接近崩溃的Xamarin Profiler控制台:

03-08 13:38:56.797 I/SurfaceFlinger( 3311): Display 0 HWC layers:
03-08 13:38:56.797 I/SurfaceFlinger( 3311):     type    |    handle    | flag |  format   |   source crop (l,t,r,b)    |         frame       | name 
03-08 13:38:56.797 I/SurfaceFlinger( 3311): ------------+--------------+------+-----------+----------------------------+---------------------+------
03-08 13:38:56.797 I/SurfaceFlinger( 3311):      Device | 0x7456253da0 | 0000 | RGBA_8888 |   0.0    0.0 1080.0 2220.0 |    0    0 1080 2220 | com.myapp.mobile/myapp.Mob[...].Views.InitializationScreen[29425]#0
03-08 13:38:56.797 I/SurfaceFlinger( 3311):      Device | 0x7455e49000 | 0000 | RGBA_8888 |   0.0    0.0   67.0  429.0 | 1013  592 1080 1021 | com.samsung.android.app.cocktailbars[...]rservice.CocktailBarService[14111]#0
03-08 13:38:56.797 I/SurfaceFlinger( 3311): 
03-08 13:38:56.798 D/Layer   ( 3311): [9c16bd7 StatusBar#0]::reparent oldParent:[Surface(name=9c16bd7 StatusBar)/@0xd24d4f6 - animation-leash#0], newParent:[WindowToken{4248f56 android.os.BinderProxy@79e2571}#0]
03-08 13:38:56.798 I/SurfaceFlinger( 3311): id=8714 Removed Surface(name=9c16bd7 StatusBar)/@0xd24d4f6 - animation-leash#0 (1/86)
03-08 13:38:56.798 I/StackScroller( 8301): ADJUST STACK.TRANSLATION
03-08 13:38:56.798 I/PanelView( 8301): n.B.P.E.C:false, false, false, false, false, false
03-08 13:38:56.806 I/Layer   ( 3311): id=8714 onRemoved Surface(name=9c16bd7 StatusBar)/@0xd24d4f6 - animation-leash#0 
03-08 13:38:56.806 I/StackScroller( 8301): ADJUST STACK.TRANSLATION
03-08 13:38:56.806 I/chatty  ( 8301): uid=10002(com.samsung.android.app.aodservice) com.android.systemui identical 1 line
03-08 13:38:56.807 I/StackScroller( 8301): ADJUST STACK.TRANSLATION
03-08 13:38:56.813 D/ViewRootImpl@6805198[InitializationScreen](29425): MSG_RESIZED: frame=Rect(0, 0 - 1080, 2220) ci=Rect(0, 63 - 0, 126) vi=Rect(0, 0 - 0, 0) or=1
03-08 13:38:56.847 E//system/bin/tombstoned( 3583): Tombstone written to: /data/tombstones/tombstone_04
03-08 13:38:56.850 E/audit   ( 3433): type=1701 audit(1552045136.845:6051): auid=4294967295 uid=10403 gid=10403 ses=4294967295 subj=u:r:untrusted_app_25:s0:c512,c768 pid=29425 comm=54687265616420506F6F6C20576F72 exe="/system/bin/app_process64" sig=6
03-08 13:38:56.861 I/BootReceiver( 3871): Copying /data/tombstones/tombstone_04 to DropBox (SYSTEM_TOMBSTONE)
03-08 13:38:56.866 W/ActivityManager( 3871): crash : com.myapp.mobile,0
03-08 13:38:56.876 W/ActivityManager( 3871):   Force finishing activity com.myapp.mobile/myapp.Mobile.Droid.Views.InitializationScreen

Logcat输出:

 2019-03-08 14:33:24.824 30618-30618/com.myapp.mobile D/Mono: Assembly Ref addref Plugin.CurrentActivity[0x7627f95300] -> Mono.Android[0x7627fb1700]: 26
2019-03-08 14:33:24.827 30618-30618/com.myapp.mobile A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 30618 (cmyapp.mobile), pid 30618 (cmyapp.mobile)

我已经很长时间了,但是我不知道为什么Xamarin Profiler会使我的应用程序崩溃。 该应用在调试/发布模式下表现良好。

1 个答案:

答案 0 :(得分:3)

尽管他们错过了Xamarin Profiler documentation的这一步,但您应该禁用 Android选项中的使用共享运行时选项,因为他们确实在{{3 }}。

这对我有用。