0
我想給SightCall Android SDK中融入在我的Xamarin的應用程序。由於SDK包含jar和.so文件,我需要將它作爲Java綁定庫綁定,然後將其作爲參考添加到我的項目中。我遵循了在Xamarin網站中創建Java綁定項目的步驟,但在構建之後,我得到了12個錯誤和許多警告。這12個錯誤如下:在Xamarin中綁定Java庫時的錯誤和警告?
C:\Users\user\Documents\Projects\SightCallBindingLibrary\SightCallBindingLibrary\obj\Debug\generated\src\Net.Rtccloud.Sdk.Event.Meetingpoint.RequestEvent.cs(8,8): Error CS0019: Operator '!=' cannot be applied to operands of type 'Net.Rtccloud.Sdk.Event.Meetingpoint.RequestEvent.Type' and 'System.Type' (CS0019) (SightCallBindingLibrary)
C:\Users\user\Documents\Projects\SightCallBindingLibrary\SightCallBindingLibrary\obj\Debug\generated\src\Net.Rtccloud.Sdk.Event.Meetingpoint.RequestEvent.cs(7,7): Error CS1502: The best overloaded method match for 'Android.Runtime.JNIEnv.StartCreateInstance(System.IntPtr, System.IntPtr, params Android.Runtime.JValue[])' has some invalid arguments (CS1502) (SightCallBindingLibrary)
C:\Users\user\Documents\Projects\SightCallBindingLibrary\SightCallBindingLibrary\obj\Debug\generated\src\Net.Rtccloud.Sdk.Event.Meetingpoint.RequestEvent.cs(59,59): Error CS1503: Argument 1: cannot convert from 'Net.Rtccloud.Sdk.Event.Meetingpoint.RequestEvent.Type' to 'System.IntPtr' (CS1503) (SightCallBindingLibrary)
C:\Users\user\Documents\Projects\SightCallBindingLibrary\SightCallBindingLibrary\obj\Debug\generated\src\Net.Rtccloud.Sdk.Event.Meetingpoint.RequestEvent.cs(71,71): Error CS1503: Argument 2: cannot convert from 'string' to 'System.IntPtr' (CS1503) (SightCallBindingLibrary)
C:\Users\user\Documents\Projects\SightCallBindingLibrary\SightCallBindingLibrary\obj\Debug\generated\src\Net.Rtccloud.Sdk.Event.Meetingpoint.RequestEvent.cs(9,9): Error CS0019: Operator '==' cannot be applied to operands of type 'Net.Rtccloud.Sdk.Event.Meetingpoint.RequestEvent.Type' and 'System.Type' (CS0019) (SightCallBindingLibrary)
C:\Users\user\Documents\Projects\SightCallBindingLibrary\SightCallBindingLibrary\obj\Debug\generated\src\Net.Rtccloud.Sdk.Event.Meetingpoint.RequestEvent.cs(9,9): Error CS0019: Operator '==' cannot be applied to operands of type 'Net.Rtccloud.Sdk.Event.Meetingpoint.RequestEvent.Type' and 'System.Type' (CS0019) (SightCallBindingLibrary)
C:\Users\user\Documents\Projects\SightCallBindingLibrary\SightCallBindingLibrary\obj\Debug\generated\src\Net.Rtccloud.Sdk.Event.Meetingpoint.RequestEvent.cs(8,8): Error CS0019: Operator '==' cannot be applied to operands of type 'Net.Rtccloud.Sdk.Event.Meetingpoint.RequestEvent.Type' and 'System.Type' (CS0019) (SightCallBindingLibrary)
C:\Users\user\Documents\Projects\SightCallBindingLibrary\SightCallBindingLibrary\obj\Debug\generated\src\Net.Rtccloud.Sdk.Event.Meetingpoint.StatusEvent.cs(8,8): Error CS0019: Operator '!=' cannot be applied to operands of type 'Net.Rtccloud.Sdk.Event.Meetingpoint.StatusEvent.Type' and 'System.Type' (CS0019) (SightCallBindingLibrary)
C:\Users\user\Documents\Projects\SightCallBindingLibrary\SightCallBindingLibrary\obj\Debug\generated\src\Net.Rtccloud.Sdk.Event.Meetingpoint.StatusEvent.cs(7,7): Error CS1502: The best overloaded method match for 'Android.Runtime.JNIEnv.StartCreateInstance(System.IntPtr, System.IntPtr, params Android.Runtime.JValue[])' has some invalid arguments (CS1502) (SightCallBindingLibrary)
C:\Users\user\Documents\Projects\SightCallBindingLibrary\SightCallBindingLibrary\obj\Debug\generated\src\Net.Rtccloud.Sdk.Event.Meetingpoint.StatusEvent.cs(59,59): Error CS1503: Argument 1: cannot convert from 'Net.Rtccloud.Sdk.Event.Meetingpoint.StatusEvent.Type' to 'System.IntPtr' (CS1503) (SightCallBindingLibrary)
C:\Users\user\Documents\Projects\SightCallBindingLibrary\SightCallBindingLibrary\obj\Debug\generated\src\Net.Rtccloud.Sdk.Event.Meetingpoint.StatusEvent.cs(71,71): Error CS1503: Argument 2: cannot convert from 'string' to 'System.IntPtr' (CS1503) (SightCallBindingLibrary)
C:\Users\user\Documents\Projects\SightCallBindingLibrary\SightCallBindingLibrary\obj\Debug\generated\src\Net.Rtccloud.Sdk.Event.Meetingpoint.StatusEvent.cs(8,8): Error CS0019: Operator '==' cannot be applied to operands of type 'Net.Rtccloud.Sdk.Event.Meetingpoint.StatusEvent.Type' and 'System.Type' (CS0019) (SightCallBindingLibrary)
請問我可以讓我知道如何解決上述問題?
編輯
<metadata>
<!--
This sample removes the class: android.support.v4.content.AsyncTaskLoader.LoadTask:
<remove-node path="/api/package[@name='android.support.v4.content']/class[@name='AsyncTaskLoader.LoadTask']" />
This sample removes the method: android.support.v4.content.CursorLoader.loadInBackground:
<remove-node path="/api/package[@name='android.support.v4.content']/class[@name='CursorLoader']/method[@name='loadInBackground']" />
-->
<!-- <remove-node path="/api/package[@name='Net.Rtccloud.Sdk.Event.Meetingpoint']/class[@name='RequestEvent.Type']" />-->
<!-- <remove-node path="/api/package[@name='Net.Rtccloud.Sdk.Event.Meetingpoint.RequestEvent']"/>-->
<!-- <remove-node path="/api/package[@name='Net.Rtccloud.Sdk.Event.Meetingpoint.MeetingPointEvent']/class[@name='RequestEvent.Type']"/>-->
</metadata>
我註釋掉中,我試過,因爲我得到一個警告,刪除節點路徑匹配沒有節點的各種方式。
嗨,你可以請提供完整的構建跟蹤(具有較低冗長級別)?以及生成的文件'RequestEvent.cs'和'StatusEvent.cs' –
綁定文件也將是巨大的 –
嗨@SimonMarquis,當然,我可以爲您提供完整的構建軌跡和RequestEvent.cs和StatusEvent.cs但由於我無法在這裏上傳這些文件,請告訴我以哪種方式可以與您分享?你也可以讓我知道你需要什麼綁定文件? –