我有UWP应用程序并使用Akavache.添加MobileCenter NuGet包后,我在构建应用程序时遇到了这个问题:
Payload contains two or more files with the same destination path 'SQLitePCLRaw.batteries_v2.dll'.
Source files:C:\Users\user\.nuget\packages\SQLitePCLRaw.bundle_e_sqlite3\1.1.0\lib\uap10.0\SQLitePCLRaw.batteries_v2.dll
C:\Users\user\.nuget\packages\SQLitePCLRaw.bundle_green\1.1.2\lib\uap10.0\SQLitePCLRaw.batteries_v2.dll
Run Code Online (Sandbox Code Playgroud)
如何在不删除Akavache或VSMC的情况下修复它?
calabash appium xamarin.uitest mobile-center visual-studio-app-center
在Visual Studio App Center中启动构建时,我在构建日志中收到此错误.我该如何解决?
==============================================================================
##[error]Publish build artifacts failed with error: Not found PathtoPublish: /Users/ci/agent/vstsagent/_work/1/a/symbols
##[section]Finishing: Publish symbols
##[section]Starting: Create distribution
==============================================================================
Task : Mobile Center Upload
Description : Upload mobile app packages to Visual Studio Mobile Center
Version : 0.115.1
Author : Microsoft Corporation
Help : Upload mobile app packages to Visual Studio Mobile Center
==============================================================================
##[warning]Cannot find any file based on /Users/ci/agent/vstsagent/_work/1/a/symbols.
##[error]TypeError: Cannot read property 'forEach' of null
##[section]Finishing: Create distribution
##[section]Starting: Post Job Cleanup
Run Code Online (Sandbox Code Playgroud) 上下文
我正在尝试在Android模拟器上测试我的Xamarin Forms应用崩溃报告.所有Google Analytics功能都在运行,但我无法在服务器中看到单个崩溃报告.我正在使用,Crashes.GenerateTestCrash();但我也产生了真正的崩溃.
从诊断开始,设备似乎甚至不会将崩溃信息发送到服务器.
题
我错过了什么?或者我还应该尝试什么?
诊断和我到目前为止所尝试的内容
首先,我仔细阅读了故障排除页面https://docs.microsoft.com/en-us/mobile-center/sdk/troubleshooting/xamarin 段落'崩溃未显示在门户网站中'
我知道我必须再次启动应用程序,以发送崩溃信息
MobileCenter.LogLevel = LogLevel.Verbose;似乎一切都已初始化好了,包括'设置Xamarin崩溃处理程序'Crashes.GenerateTestCrash();是否正在执行.在OnStart中我还检查了以前的崩溃:
// Returns false:
bool didAppCrash = Crashes.HasCrashedInLastSessionAsync().Result;
ErrorReport crashReport = Crashes.GetLastSessionCrashReportAsync().Result;
控制台日志部分
09-19 10:10:14.036 I/MobileCenterCrashes( 3173): Set up Xamarin crash handler.
09-19 10:10:14.064 F/MobileCenter( 3173): Mobile Center SDK configured successfully.
...
09-19 10:10:14.081 D/MobileCenter( 3173): checkPendingLogs(group_core) pendingLogCount=0
09-19 10:10:14.081 D/MobileCenter( 3173): Mobile Center storage initialized.
09-19 10:10:14.081 D/MobileCenter( 3173): checkPendingLogs(group_analytics) pendingLogCount=0
09-19 10:10:14.082 …Run Code Online (Sandbox Code Playgroud) android xamarin xamarin.forms mobile-center visual-studio-app-center
尝试在现有Xamarin.iOS应用程序上使用新的AppCenter时,AppCenter.Crashes API遇到了一些麻烦。
我遵循“入门”部分,并在AppDelegate.cs中添加以下代码:
using Microsoft.AppCenter;
using Microsoft.AppCenter.Analytics;
using Microsoft.AppCenter.Crashes;
// ...
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
//...
// App Center
AppCenter.Start("xxxxxxx-xxxx-xxxx-xxxx", typeof(Analytics), typeof(Crashes));
return true;
}
Run Code Online (Sandbox Code Playgroud)
我还安装了相应的NuGet软件包(这是我的packages.config中的相应行)
<package id="Microsoft.AppCenter" version="1.5.0" targetFramework="xamarinios10" />
<package id="Microsoft.AppCenter.Analytics" version="1.5.0" targetFramework="xamarinios10" />
<package id="Microsoft.AppCenter.Crashes" version="1.5.0" targetFramework="xamarinios10" />
Run Code Online (Sandbox Code Playgroud)
请注意,如果我禁用AppCenter.Crashes模块:
AppCenter.Start("xxxxxxx-xxxx-xxxx-xxxx", typeof(Analytics));
Run Code Online (Sandbox Code Playgroud)
一切都很好(我可以在App Center后端看到Google Analytics(分析))
但是启用了AppCenter.Crashes模块后,我的应用程序崩溃,控制台中显示以下消息:
11:24:53.521334 +0100 MyApp.iOS [AppCenter] VERBOSE: +[MSAppDelegateForwarder addTraceBlock:]_block_invoke_2/101 Start buffering traces.
11:24:53.521381 +0100 MyApp.iOS [AppCenter] DEBUG: +[MSAppDelegateForwarder load]_block_invoke/48 Application delegate forwarder is enabled. It may use swizzling.
11:24:53.521587 +0100 …Run Code Online (Sandbox Code Playgroud) 无法使用CocoaPods添加MobileCenter.CocoaPods无法找到MobileCenter的规范.
Podfile
platform :ios, '8.0'
target 'VisualStudioMobileCenterDemo' do
pod 'MobileCenter'
end
Run Code Online (Sandbox Code Playgroud)
错误
目前我在Xcode构建阶段使用构建脚本:
#!/bin/bash
buildPlist=${INFOPLIST_FILE}
CFBundleVersion=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" $buildPlist)
CFBundleVersion=$(($CFBundleVersion + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $CFBundleVersion" $buildPlist
Run Code Online (Sandbox Code Playgroud)
目前,构建数量在每次构建时都会增加,而不是非常优雅.
是否有可能检查构建系统是否在Mobile Center上运行以仅增加构建号?
无法弄清楚. - 非常感谢帮助.
上下文
经过几个小时的无聊工作,我刚刚将我的所有PCL项目迁移到Xamarin.Forms解决方案中的.NET标准.(为什么?因为当时看起来好主意)
无论如何,我取得了成功.
下一步我决定添加Xamarin Insights,我被引导到https://mobile.azure.com/,我指示使用Microsoft.Azure.Mobile.Analytics和Microsoft.Azure.Mobile.Crashes包.
但是在安装任何软件包时出现此错误:
Package Microsoft.Azure.Mobile.Analytics 0.15.0 is not compatible with netstandard1.4 (.NETStandard,Version=v1.4). Package
Microsoft.Azure.Mobile.Analytics 0.15.0 supports:
- monoandroid403 (MonoAndroid,Version=v4.0.3)
- portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)
- uap10.0 (UAP,Version=v10.0)
- xamarinios10 (Xamarin.iOS,Version=v1.0)
Run Code Online (Sandbox Code Playgroud)
题
我理解错误.请不要告诉我,我必须将我的所有项目再次迁移回PCL.(并放弃.NET标准).
我有一些记忆,在某处我读到有一个神奇的包,我安装然后它提供了一些技巧,一切都将再次酷.(或者我在做什么?)
今天我加入了我的项目
using Microsoft.Azure.Mobile;
using Microsoft.Azure.Mobile.Analytics;
using Microsoft.Azure.Mobile.Crashes;
Run Code Online (Sandbox Code Playgroud)
我应该使用Visual Studio Mobile Center,但之后我收到52次错误
/Users/enricorossini/Projects/myInventories/myInventories/myInventories.iOS/MTOUCH:错误MT5209:本机链接错误:警告:目标文件(/Users/enry/Projects/myInventories/my/my.iOS/obj/iPhone/Debug/ build-ipad6.3-10.1.1/mtouch-cache/MobileCenterAnalytics.a(MSPageLog.o))是为较新的iOS版本(8.0)而不是链接(7.0)(MT5209)(my.iOS)而构建的
我该怎么做才能解决它?先感谢您.
visual-studio xamarin.forms mobile-center visual-studio-app-center
我开发了一个Xamarin.Android应用程序,我使用Xamarin.Insights来获取有关崩溃或发生错误的信息.
由于该视频(https://www.youtube.com/watch?v=E_uOgl-sO5A&t=680s),我正在将此项目迁移到移动中心.
我想知道如何在崩溃报告期间添加有关崩溃的其他信息.例如,我想知道用户是否连接到wifi,或用户的身份,或其他任何东西.或者我想在try catch中报告错误,其中包含有关此时使用的异常捕获和实际变量值的信息.
使用Xamarin.Insight,它非常简单:
string sAdditionnalInformation = exc.Message + sTitle + sDescription;
Insights.Report(exc, sAdditionnalInformation , Insights.Severity.Error);
Run Code Online (Sandbox Code Playgroud)
我怎么能用Mobile Center做到这一点?
我在这里看到了文档:https://docs.microsoft.com/en-us/mobile-center/sdk/crashes/xamarin
我知道有以下方法手动报告崩溃,但我无法添加其他信息:
Crashes.GenerateTestCrash()
Run Code Online (Sandbox Code Playgroud)
我已经看到了下面的事件,但我不知道如何添加附加信息.我没有找到任何关于这方面的文件.
Crashes.SentErrorReport
Run Code Online (Sandbox Code Playgroud)
任何帮助将非常感谢请:-)
我已经尝试将Azure Mobile Center添加到已经使用HockeyApp进行崩溃报告(和分发)的项目中.
这是Podfile:
use_frameworks!
target "MyApp" do
pod 'HockeySDK', '3.8.5'
pod 'MobileCenter'
...and some other pods...
end
Run Code Online (Sandbox Code Playgroud)
在pod install它上面添加了MobileCenter 0.9.0版.
该应用程序无法与可怕的构建Apple Mach-O Linker Error.这是相关的错误输出:
duplicate symbol ___cxa_throw in:
/Users/joncox/Documents/TAB/RTI-Client/Pods/HockeySDK/HockeySDK-iOS/HockeySDK.embeddedframework/HockeySDK.framework/HockeySDK(BITCrashCXXExceptionHandler.o)
/Users/joncox/Documents/TAB/RTI-Client/Pods/MobileCenter/MobileCenter-SDK-iOS/MobileCenterCrashes.framework/MobileCenterCrashes(MSCrashesCXXExceptionHandler.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)
同样的事情发生,如果您手动添加MobileCenter.framework,MobileCenterAnalytics.framework和MobileCenterCrashes.framework框架,描述的文档.
但是,如果您只手动添加MobileCenter.framework和MobileCenterAnalytics.framework框架.
所以我的问题是:我搞砸了某个地方还是让微软搞砸了某个地方,并在他们HockeyApp和MobileCenterCrashes框架中给出了同样的全球名称?