我的項目中發生了特定問題。我發現C#只支持Android的一個庫(在Xamarin中):Sharp.XMPP,NuGet,但是我遇到了麻煩。當我寫在分離的便攜式類庫一些示例代碼,我得到這些錯誤:Xamarin.Forms使用Sharp.XMPP庫的便攜式類庫項目
Error 1: '.ctor' is not supported by the language
由線
using (XmppClient client = new XmppClient(hostname, username, password))
{
...
}
下一頁:
Error 2: Metadata file '...\Project.Jabber.dll' could not be found
Warnings 2-6: Reference to type 'System.Net.Security.RemoteCertificateValidationCallback' claims it is defined in 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile78\System.dll', but it could not be found c:\Users\Kliford\Downloads\S22.Xmpp\S22.Xmpp.dll
我無言以對。 預先感謝您。
好吧,我終於成立了項目與庫,非常感謝,但我連接之後,出現錯誤:主機未知。任何想法? – Kliford
可能是一些DNS設置問題。設置XMPP服務器需要一些配置。你可以在這裏或在github上發佈一個新問題,如果可以的話,我會很樂意提供幫助。 –
[這裏](http://stackoverflow.com/questions/32780463/host-unknown-exception-in-xmpp-xamarin-android)是問題。非常感謝,我非常感謝一個努力。 – Kliford