我正在尝试在我的 Xamarin Android 应用程序中集成用于 Microsoft Customer Insights Engagement Insights 的 Android SDK,并且需要创建一个 Xamarin.Android Java 绑定库,因为 SDK 提供了一个预发布的 aar 文件。
我创建了一个 Android 绑定库(Xamarin)项目,添加了 eiandroidsdk-debug.aar 并按照此处提到的步骤创建 dll 文件。我在构建时遇到以下错误:
\obj\Debug\generated\src\Com.Microsoft.Engagementinsights.Transmission.Core.InternalMgrImpl.cs(78,76,78,90): error CS0234: The type or namespace name 'EventMessenger' does not exist in the namespace 'Com.Microsoft.Engagementinsights.Transmission.Core' \obj\Debug\generated\src\Com.Microsoft.Engagementinsights.Transmission.Core.ITransmissionEvents.cs(13,130,13,148): error CS0234: The type or namespace name 'RecordWithMetadata' does not exist in the namespace 'Com.Microsoft.Engagementinsights.Transmission.Core' \obj\Debug\generated\src\Com.Microsoft.Engagementinsights.Transmission.Core.ITransmissionEvents.cs(17,127,17,145): error CS0234: The type or namespace name 'RecordWithMetadata' does not exist in the namespace 'Com.Microsoft.Engagementinsights.Transmission.Core' \obj\Debug\generated\src\Com.Microsoft.Engagementinsights.Transmission.Core.ITransmissionEvents.cs(21,129,21,147): error CS0234: The type or namespace name 'RecordWithMetadata' does not exist in the namespace 'Com.Microsoft.Engagementinsights.Transmission.Core' \obj\Debug\generated\src\Com.Microsoft.Engagementinsights.Transmission.Core.ITransmissionEvents.cs(25,121,25,139): error CS0234: The type or namespace name 'RecordWithMetadata' does not exist in the namespace 'Com.Microsoft.Engagementinsights.Transmission.Core' \obj\Debug\generated\src\Com.Microsoft.Engagementinsights.Transmission.Core.ITransmissionEvents.cs(103,144,103,162): error CS0234: The type or namespace name 'RecordWithMetadata' does not exist in the namespace 'Com.Microsoft.Engagementinsights.Transmission.Core' \obj\Debug\generated\src\Com.Microsoft.Engagementinsights.Transmission.Core.ITransmissionEvents.cs(136,141,136,159): error CS0234: The type or namespace name 'RecordWithMetadata' does not exist in the namespace 'Com.Microsoft.Engagementinsights.Transmission.Core' \obj\Debug\generated\src\Com.Microsoft.Engagementinsights.Transmission.Core.ITransmissionEvents.cs(170,143,170,161): error CS0234: The type or namespace name 'RecordWithMetadata' does not exist in the namespace 'Com.Microsoft.Engagementinsights.Transmission.Core' \obj\Debug\generated\src\Com.Microsoft.Engagementinsights.Transmission.Core.ITransmissionEvents.cs(203,135,203,153): error CS0234: The type or namespace name 'RecordWithMetadata' does not exist in the namespace 'Com.Microsoft.Engagementinsights.Transmission.Core'
在 sdk github 页面上也提出了一个问题:https ://github.com/microsoft/engagementinsights-sdk-android/issues/1
我尝试同时针对 Android SDK 10 和 11,但没有效果。有谁知道 aar 文件是否有问题或者我在绑定过程中遗漏了什么?