xamarin - Visual Studio App Center Analytics 不适用于 Xamarin Forms Android 项目

标签 xamarin xamarin.forms visual-studio-app-center

我正在为我的 Xamarin Forms Android 应用程序使用 Visual Studio App Center 来捕获分析(事件和崩溃)

我正在 App.Xaml.cs

OnStart 中配置崩溃和分析
AppCenter.Start($"android={Settings.Current.AppCenterAnalyticsAndroid};" +
typeof(Analytics), typeof(Crashes));

为了调用事件,我调用了下面的方法。

public void TrackEvent(string name, Dictionary<string, string> properties = null)
{
       Analytics.SetEnabledAsync(true).ConfigureAwait(false);
       Analytics.TrackEvent(name, properties);
}

App Center 中的崩溃记录正确,但事件未正确记录。 我也可以在 Log Flow

中看到相应的条目

最佳答案

您的应用密码字符串无效,因为它包含 + typeof(Analytics),应该是 , typeof(Analytics)

由于您使用了 android 键/值分隔符,我们可以提取 appSecret 并使其与崩溃一起使用,但 typeof(Analytics) 最终出现了错误的 appSecret 参数字符串。

关于xamarin - Visual Studio App Center Analytics 不适用于 Xamarin Forms Android 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51191364/

相关文章:

xamarin - 如何从 TFS 连接 Visual Studio 应用程序中心(本地)

c# - Visual Studio 2017 中的 Xamarin (Android) 单元测试

xamarin - System.TypeLoadException : 'VTable setup of type Xamarin.Forms.Forms+AndroidPlatformServices failed'

xamarin - 如何符号化 Xamarin Forms iOS 项目中的崩溃/错误日志?

android - 应用中心构建 : error CS0103: The name 'Android' does not exist in the current context

visual-studio-app-center - AppCenter 测试分块失败 :

android - System.InvalidCastException - 在调试中有效,在发布时失败

c# - "ResolveLibraryProjectImports"任务意外失败

android - Xamarin PCL 嵌入式资源

listview - Xamarin Forms ListView - 异常?