我们正在努力让Xamarin Profiler从我们的Android应用程序开始。
我们使用Visual Studio 2017 Enterprise(15.4.3)和Xamarin Profiler v1.6.0.16,Xamarin版本4.7.10.38。
每当我们尝试使用分析器时,它只会停止并写入其日志文件:
设备[...]上安装的运行时太旧了。使用较新版本的Xamarin Studio再次部署您的应用程序。
这让我们感到困惑,因为我们根本就没有使用Xamarin Studio。
我们尝试过:
但我们总能得到相同的结果:“使用较新版本的Xamarin Studio再次部署您的应用程序”。
任何建议都将不胜感激;感谢。
探查器的日志文件如下:
XamarinProfiler.Core.Profiler Information: 0 : [2017-11-15 10:19:34.2416] ##########################################
XamarinProfiler.Core.Profiler Information: 0 : [2017-11-15 10:19:34.2416] # Xamarin Profiler version - 1.6.0.16
XamarinProfiler.Core.Profiler Information: 0 : [2017-11-15 10:19:34.2416] # * Arch x86_64
XamarinProfiler.Core.Profiler Information: 0 : [2017-11-15 10:19:34.2416] ##########################################
XamarinProfiler.Core.Profiler Information: 0 : [2017-11-15 10:19:34.3820] initializing android platform
XamarinProfiler.Core.Profiler Information: 0 : [2017-11-15 10:19:34.3820] initializing ios platform
XamarinProfiler.Core.Profiler Information: 0 : [2017-11-15 10:19:34.3820] initializing mlpd platform
XamarinProfiler.Core.Profiler Information: 0 : [2017-11-15 10:19:34.4600] processing command line = C:\Program Files (x86)\Xamarin\Profiler\XamarinProfiler.exe --type=android --target=au.com.<redacted>|md52635741fd041340e6948a5329c9048f1.MainScreen --device=025b38394ca8478b --options=name:LGE Nexus 5X
XamarinProfiler.Windows.Core.WindowsRunFactory Information: 0 : [2017-11-15 10:19:44.6840] Creating android run for au.com.<redacted>|md52635741fd041340e6948a5329c9048f1.MainScreen target on device 025b38394ca8478b
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-11-15 10:19:44.7152] Initializing profiling...
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-11-15 10:19:44.7620] Waiting for device 025b38394ca8478b to connect
XamarinProfiler.Windows.MainWindow Information: 0 : [2017-11-15 10:19:44.7620] StartRecording for au.com.<redacted>
XamarinProfiler.Core.Platforms.Android.ProfileAndroidRun Information: 0 : [2017-11-15 10:19:45.4582] checking runtime version on device LGE Nexus 5X
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Error: 0 : [2017-11-15 10:19:46.1802] Sorry, something went wrong trying to run au.com.<redacted>: Runtime installed on device LGE Nexus 5X is too old. Deploy your app again with a newer version of Xamarin Studio
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Error: 0 : [2017-11-15 10:19:46.1802] Sorry, something went wrong trying to run au.com.<redacted>: Runtime installed on device LGE Nexus 5X is too old. Deploy your app again with a newer version of Xamarin Studio
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-11-15 10:19:46.1812] Sorry, something went wrong trying to run au.com.<redacted>: Runtime installed on device LGE Nexus 5X is too old. Deploy your app again with a newer version of Xamarin Studio
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-11-15 10:19:46.1822] Stopping application au.com.<redacted>.md52635741fd041340e6948a5329c9048f1.MainScreen
XamarinProfiler.Windows.MainWindow Error: 0 : [2017-11-15 10:19:46.1892] Error occured on run au.com.<redacted>: Runtime installed on device LGE Nexus 5X is too old. Deploy your app again with a newer version of Xamarin Studio
XamarinProfiler.Windows.MainWindow Error: 0 : [2017-11-15 10:19:46.1892] Error occured on run au.com.<redacted>: Runtime installed on device LGE Nexus 5X is too old. Deploy your app again with a newer version of Xamarin Studio
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-11-15 10:19:46.2812] Application au.com.<redacted>.md52635741fd041340e6948a5329c9048f1.MainScreen stopped
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-11-15 10:19:46.2852] Stopping session. Please wait...
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-11-15 10:19:46.2952] Stopped
XamarinProfiler.Windows.MainWindow Information: 0 : [2017-11-15 10:19:46.2982] CurrentRun.Finished for au.com.<redacted>
XamarinProfiler.Windows.Core.WindowsRunFactory Information: 0 : [2017-11-15 10:20:48.4232] Creating android run for au.com.<redacted>|md52635741fd041340e6948a5329c9048f1.MainScreen target on device 025b38394ca8478b
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-11-15 10:20:48.4232] Initializing profiling...
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-11-15 10:20:48.4562] Waiting for device 025b38394ca8478b to connect
XamarinProfiler.Windows.MainWindow Information: 0 : [2017-11-15 10:20:48.4562] StartRecording for au.com.<redacted>
XamarinProfiler.Core.Platforms.Android.ProfileAndroidRun Information: 0 : [2017-11-15 10:20:50.0302] checking runtime version on device LGE Nexus 5X
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Error: 0 : [2017-11-15 10:20:50.7792] Sorry, something went wrong trying to run au.com.<redacted>: Runtime installed on device LGE Nexus 5X is too old. Deploy your app again with a newer version of Xamarin Studio
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Error: 0 : [2017-11-15 10:20:50.7792] Sorry, something went wrong trying to run au.com.<redacted>: Runtime installed on device LGE Nexus 5X is too old. Deploy your app again with a newer version of Xamarin Studio
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-11-15 10:20:50.7792] Sorry, something went wrong trying to run au.com.<redacted>: Runtime installed on device LGE Nexus 5X is too old. Deploy your app again with a newer version of Xamarin Studio
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-11-15 10:20:50.7792] Stopping application au.com.<redacted>.md52635741fd041340e6948a5329c9048f1.MainScreen
XamarinProfiler.Windows.MainWindow Error: 0 : [2017-11-15 10:20:50.7802] Error occured on run au.com.<redacted>: Runtime installed on device LGE Nexus 5X is too old. Deploy your app again with a newer version of Xamarin Studio
XamarinProfiler.Windows.MainWindow Error: 0 : [2017-11-15 10:20:50.7802] Error occured on run au.com.<redacted>: Runtime installed on device LGE Nexus 5X is too old. Deploy your app again with a newer version of Xamarin Studio
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-11-15 10:20:50.8902] Application au.com.<redacted>.md52635741fd041340e6948a5329c9048f1.MainScreen stopped
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-11-15 10:20:50.8902] Stopping session. Please wait...
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-11-15 10:20:50.8902] Stopped
XamarinProfiler.Windows.MainWindow Information: 0 : [2017-11-15 10:20:50.8912] CurrentRun.Finished for au.com.<redacted>
答案 0 :(得分:0)
同样在这里,增加研究。 Xamarin Profiler在LGE Nexus 5X Android 8.0.0上运行的示例SingleViewApp Xamarin项目失败,但在旧的Samsung SM-T280 Android 5.1.1上成功运行。
失败案例分析器日志
XamarinProfiler.Core.Profiler Information: 0 : [2017-12-03 14:47:34.5188] ##########################################
XamarinProfiler.Core.Profiler Information: 0 : [2017-12-03 14:47:34.5207] # Xamarin Profiler version - 1.6.0.16
XamarinProfiler.Core.Profiler Information: 0 : [2017-12-03 14:47:34.5207] # * Arch x86_64
XamarinProfiler.Core.Profiler Information: 0 : [2017-12-03 14:47:34.5207] ##########################################
XamarinProfiler.Core.Profiler Information: 0 : [2017-12-03 14:47:34.7168] initializing android platform
XamarinProfiler.Core.Profiler Information: 0 : [2017-12-03 14:47:34.7168] initializing ios platform
XamarinProfiler.Core.Profiler Information: 0 : [2017-12-03 14:47:34.7174] initializing mlpd platform
XamarinProfiler.Core.Profiler Information: 0 : [2017-12-03 14:47:34.8973] processing command line = C:\Program Files (x86)\Xamarin\Profiler\XamarinProfiler.exe --type=android --target=SingleViewApp.SingleViewApp|singleviewapp.SingleViewApp --device=00d0eee43fcc3e58 --options=name:LGE Nexus 5X
XamarinProfiler.Windows.Core.WindowsRunFactory Information: 0 : [2017-12-03 14:47:45.4078] Creating android run for SingleViewApp.SingleViewApp|singleviewapp.SingleViewApp target on device 00d0eee43fcc3e58
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-12-03 14:47:45.4293] Initializing profiling...
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-12-03 14:47:45.4850] Waiting for device 00d0eee43fcc3e58 to connect
XamarinProfiler.Windows.MainWindow Information: 0 : [2017-12-03 14:47:45.4880] StartRecording for SingleViewApp.SingleViewApp
XamarinProfiler.Core.Platforms.Android.ProfileAndroidRun Information: 0 : [2017-12-03 14:47:48.0039] checking runtime version on device LGE Nexus 5X
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Error: 0 : [2017-12-03 14:47:49.5410] Sorry, something went wrong trying to run SingleViewApp.SingleViewApp: Runtime installed on device LGE Nexus 5X is too old. Deploy your app again with a newer version of Xamarin Studio
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Error: 0 : [2017-12-03 14:47:49.5410] Sorry, something went wrong trying to run SingleViewApp.SingleViewApp: Runtime installed on device LGE Nexus 5X is too old. Deploy your app again with a newer version of Xamarin Studio
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-12-03 14:47:49.5420] Sorry, something went wrong trying to run SingleViewApp.SingleViewApp: Runtime installed on device LGE Nexus 5X is too old. Deploy your app again with a newer version of Xamarin Studio
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-12-03 14:47:49.5430] Stopping application SingleViewApp.SingleViewApp.singleviewapp.SingleViewApp
XamarinProfiler.Windows.MainWindow Error: 0 : [2017-12-03 14:47:49.5470] Error occured on run SingleViewApp.SingleViewApp: Runtime installed on device LGE Nexus 5X is too old. Deploy your app again with a newer version of Xamarin Studio
XamarinProfiler.Windows.MainWindow Error: 0 : [2017-12-03 14:47:49.5470] Error occured on run SingleViewApp.SingleViewApp: Runtime installed on device LGE Nexus 5X is too old. Deploy your app again with a newer version of Xamarin Studio
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-12-03 14:47:49.7319] Application SingleViewApp.SingleViewApp.singleviewapp.SingleViewApp stopped
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-12-03 14:47:49.7470] Stopping session. Please wait...
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-12-03 14:47:49.7571] Stopped
XamarinProfiler.Windows.MainWindow Information: 0 : [2017-12-03 14:47:49.7754] CurrentRun.Finished for SingleViewApp.SingleViewApp
失败案例Android logcat
12-03 14:37:34.523: D/AndroidRuntime(19727): >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
12-03 14:37:34.781: D/AndroidRuntime(19727): Calling main entry com.android.commands.pm.Pm
12-03 14:37:34.813: I/app_process(19727): System.exit called, status: 0
12-03 14:37:34.813: I/AndroidRuntime(19727): VM exiting with result code 0.
12-03 14:37:34.815: W/MessageQueue(19727): Handler (android.os.Handler) {6ee8755} sending message to a Handler on a dead thread
12-03 14:37:34.815: W/MessageQueue(19727): java.lang.IllegalStateException: Handler (android.os.Handler) {6ee8755} sending message to a Handler on a dead thread
12-03 14:37:34.815: W/MessageQueue(19727): at android.os.MessageQueue.enqueueMessage(MessageQueue.java:545)
12-03 14:37:34.815: W/MessageQueue(19727): at android.os.Handler.enqueueMessage(Handler.java:661)
12-03 14:37:34.815: W/MessageQueue(19727): at android.os.Handler.sendMessageAtTime(Handler.java:630)
12-03 14:37:34.815: W/MessageQueue(19727): at android.os.Handler.sendMessageDelayed(Handler.java:600)
12-03 14:37:34.815: W/MessageQueue(19727): at android.os.Handler.post(Handler.java:356)
12-03 14:37:34.815: W/MessageQueue(19727): at android.os.ResultReceiver$MyResultReceiver.send(ResultReceiver.java:57)
12-03 14:37:34.815: W/MessageQueue(19727): at com.android.internal.os.IResultReceiver$Stub.onTransact(IResultReceiver.java:58)
12-03 14:37:34.815: W/MessageQueue(19727): at android.os.Binder.execTransact(Binder.java:674)
12-03 14:37:35.793: I/ActivityManager(771): Force stopping SingleViewApp.SingleViewApp appid=10444 user=0: from pid 19740
成功案例分析器日志
XamarinProfiler.Core.Profiler Information: 0 : [2017-12-03 14:56:40.2196] ##########################################
XamarinProfiler.Core.Profiler Information: 0 : [2017-12-03 14:56:40.2216] # Xamarin Profiler version - 1.6.0.16
XamarinProfiler.Core.Profiler Information: 0 : [2017-12-03 14:56:40.2226] # * Arch x86_64
XamarinProfiler.Core.Profiler Information: 0 : [2017-12-03 14:56:40.2226] ##########################################
XamarinProfiler.Core.Profiler Information: 0 : [2017-12-03 14:56:40.4174] initializing android platform
XamarinProfiler.Core.Profiler Information: 0 : [2017-12-03 14:56:40.4174] initializing ios platform
XamarinProfiler.Core.Profiler Information: 0 : [2017-12-03 14:56:40.4186] initializing mlpd platform
XamarinProfiler.Core.Profiler Information: 0 : [2017-12-03 14:56:40.8207] processing command line = C:\Program Files (x86)\Xamarin\Profiler\XamarinProfiler.exe --type=android --target=SingleViewApp.SingleViewApp|singleviewapp.SingleViewApp --device=3100784abd71b200 --options=name:Samsung SM-T280
XamarinProfiler.Windows.Core.WindowsRunFactory Information: 0 : [2017-12-03 14:57:15.4411] Creating android run for SingleViewApp.SingleViewApp|singleviewapp.SingleViewApp target on device 3100784abd71b200
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-12-03 14:57:15.4632] Initializing profiling...
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-12-03 14:57:15.5209] Waiting for device 3100784abd71b200 to connect
XamarinProfiler.Windows.MainWindow Information: 0 : [2017-12-03 14:57:15.5229] StartRecording for SingleViewApp.SingleViewApp
XamarinProfiler.Core.Platforms.Android.ProfileAndroidRun Information: 0 : [2017-12-03 14:57:17.6114] checking runtime version on device Samsung SM-T280
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-12-03 14:57:19.0527] Starting application SingleViewApp.SingleViewApp.singleviewapp.SingleViewApp
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-12-03 14:57:20.8807] Starting profiler on Android device Samsung SM-T280 with heapshot=ondemand,alloc,nocalls,maxframes=8,counters,
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-12-03 14:57:21.6067] Opening C:\Users\robert\AppData\Local\Temp\hlvkcpc1.mlpd
XamarinProfiler.Core.Platforms.Mono.MlpdReader Information: 0 : [2017-12-03 14:57:21.6323] opening C:\Users\robert\AppData\Local\Temp\hlvkcpc1.mlpd
XamarinProfiler.Core.Platforms.Mono.MlpdReader Information: 0 : [2017-12-03 14:57:21.9964] read header with format version 13
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2017-12-03 14:57:22.5255] Reading data...
成功案例Android logcat(包含太长时间)
答案 1 :(得分:0)
您应该将Visual Studio更新为Visual Studio 2017 Enterprise( 15.6.2 ),并且Profiler可以运行。我有同样的问题
答案 2 :(得分:0)
我怀疑您都是从以下位置下载分析器 https://docs.microsoft.com/en-gb/xamarin/tools/profiler/?tabs=windows
实际上是指向带有错误的旧版本的链接,请尝试从下载 https://docs.microsoft.com/en-gb/xamarin/tools/profiler/release-notes/1.6/1.6.4