C# ';System.AggregateException';尝试在Windows应用商店应用程序8.1中使用Google Analytics时发生

C# ';System.AggregateException';尝试在Windows应用商店应用程序8.1中使用Google Analytics时发生,c#,google-analytics,windows-store-apps,windows-8.1,measurement-protocol,C#,Google Analytics,Windows Store Apps,Windows 8.1,Measurement Protocol,我试图在我的windows应用商店应用程序中使用Google Analytics,但我遇到了一个例外。我对这种东西完全陌生。请帮我修一下 NuGet软件包:GoogleAnalyticsSDK 例外情况: `System.AggregateException was unhandled by user code HResult=-2146233088 Message=One or more errors occurred. Source=mscorlib StackTrace:

我试图在我的windows应用商店应用程序中使用Google Analytics,但我遇到了一个例外。我对这种东西完全陌生。请帮我修一下

NuGet软件包:GoogleAnalyticsSDK

例外情况:

 `System.AggregateException was unhandled by user code HResult=-2146233088
  Message=One or more errors occurred.
  Source=mscorlib
  StackTrace:
       at System.Threading.Tasks.Task.ThrowIfExceptional
      (BooleanincludeTaskCanceledExceptions)
       at System.Threading.Tasks.Task.Wait
      (Int32 millisecondsTimeout, CancellationToken cancellationToken)
       at System.Threading.Tasks.Task.Wait()
       at GoogleAnalytics.EasyTracker.InitConfig(Uri configPath)
       at GoogleAnalytics.EasyTracker.SetContext(Application ctx)
       at GoogleAnalytics.EasyTracker.GetTracker()
       at HelloWorld.MainPage..ctor()
       at    HelloWorld.HelloWorld_XamlTypeInfo.XamlTypeInfoProvider.Activate_0_MainPage()
       at HelloWorld.HelloWorld_XamlTypeInfo.XamlUserType.ActivateInstance()
  InnerException: System.Xml.XmlException
       HResult=-2146232000
       Message='Text' is an invalid XmlNodeType. Line 33, position 29.
       Source=System.Xml
       LineNumber=33
       LinePosition=29
       StackTrace:
            at System.Xml.XmlReader.ReadEndElement()
            at GoogleAnalytics.EasyTrackerConfig.LoadConfigXml(XmlReader reader)
            at GoogleAnalytics.EasyTrackerConfig.Load(XmlReader reader)
            at GoogleAnalytics.EasyTracker.InitConfig(XmlReader reader)
            at GoogleAnalytics.EasyTracker.<InitConfig>b__0(Task`1 t)
            at `System.Threading.Tasks.ContinuationTaskFromResultTask1.InnerInvoke()`
               ` at System.Threading.Tasks.Task.Execute()
       InnerException:{"'Text' is an invalid XmlNodeType. Line 33, position 29."}`
`System.AggregateException未由用户代码HResult=-2146233088处理
消息=发生了一个或多个错误。
Source=mscorlib
堆栈跟踪:
位于System.Threading.Tasks.Task.ThrowifeException
(布尔值包括AskCanceledExceptions)
在System.Threading.Tasks.Task.Wait
(Int32毫秒计时,CancellationToken CancellationToken)
在System.Threading.Tasks.Task.Wait()中
在GoogleAnalytics.EasyTracker.InitConfig(Uri配置路径)上
位于GoogleAnalytics.EasyTracker.SetContext(应用程序ctx)
在GoogleAnalytics.EasyTracker.GetTracker()上
在HelloWorld.MainPage..ctor()上
在HelloWorld.HelloWorld_XamlTypeInfo.XamlTypeInfoProvider.Activate_0_主页()
在HelloWorld.HelloWorld_XamlTypeInfo.XamlUserType.ActivateInstance()中
InnerException:System.Xml.XmlException
HResult=-2146232000
Message='Text'是无效的XmlNodeType。第33行,位置29。
Source=System.Xml
行号=33
LinePosition=29
堆栈跟踪:
位于System.Xml.XmlReader.ReadEndElement()处
在GoogleAnalytics.EasyTrackerConfig.LoadConfigXml(XmlReader)上
在GoogleAnalytics.EasyTrackerConfig.Load(XmlReader)上
位于GoogleAnalytics.EasyTracker.InitConfig(XmlReader)
在GoogleAnalytics.EasyTracker.b_u__0(任务'1t)
位于'System.Threading.Tasks.ContinuationTaskFromResultTask1.InnerInvoke()`
`在System.Threading.Tasks.Task.Execute()中
InnerException:{“'Text'是无效的XmlNodeType。第33行,位置29。”}`
这是我使用分析的C#代码。它在主页上有3个按钮,我只是检查应用程序是否使用谷歌分析平台报告统计数据

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

namespace HelloWorld
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();
            string a = "Main";
             GoogleAnalytics.EasyTracker.GetTracker().SendView(a);

        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            GoogleAnalytics.EasyTracker.GetTracker().SendView("Button1");

        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            GoogleAnalytics.EasyTracker.GetTracker().SendView("Button2");
        }

        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            GoogleAnalytics.EasyTracker.GetTracker().SendView("Button3");
        }
    }
}
使用系统;
使用System.Collections.Generic;
使用System.IO;
使用System.Linq;
使用System.Runtime.InteropServices.WindowsRuntime;
使用Windows基金会;
使用Windows。
使用Windows.UI.Xaml;
使用Windows.UI.Xaml.Controls;
使用Windows.UI.Xaml.Controls.Primitives;
使用Windows.UI.Xaml.Data;
使用Windows.UI.Xaml.Input;
使用Windows.UI.Xaml.Media;
使用Windows.UI.Xaml.Navigation;
//空白页项模板被记录在http://go.microsoft.com/fwlink/?LinkId=234238
名称空间HelloWorld
{
/// 
///可以单独使用或在框架内导航到的空页。
/// 
公共密封部分类主页面:第页
{
公共主页()
{
this.InitializeComponent();
字符串a=“Main”;
GoogleAnalytics.EasyTracker.GetTracker().SendView(a);
}
私有无效按钮\u单击(对象发送者,路由目标e)
{
GoogleAnalytics.EasyTracker.GetTracker().SendView(“按钮1”);
}
私有无效按钮\u单击\u 1(对象发送者,路由目标)
{
GoogleAnalytics.EasyTracker.GetTracker().SendView(“按钮2”);
}
私有无效按钮\u单击\u 2(对象发送方,路由目标)
{
GoogleAnalytics.EasyTracker.GetTracker().SendView(“按钮3”);
}
}
}

您是否正在运行代码。。或者您确实使用了调试器来逐步执行代码..?您可能希望尝试并联系该第三方windows sdk的所有者。但看起来他自2015年以来就没有在这方面有所发展。AggregateException听起来像是库本身的错误。注意:没有针对windows的官方Google Analytics sdk。是的,我正在emulator上运行代码@我明白了。那么,在windows应用商店应用程序中进行分析的最佳选项是什么。这是官方的。提前感谢@DalmToare您正在运行代码。。或者您确实使用了调试器来逐步执行代码..?您可能希望尝试并联系该第三方windows sdk的所有者。但看起来他自2015年以来就没有在这方面有所发展。AggregateException听起来像是库本身的错误。注意:没有针对windows的官方Google Analytics sdk。是的,我正在emulator上运行代码@我明白了。那么,在windows应用商店应用程序中进行分析的最佳选项是什么。这是官方的。提前感谢@DalmTo