我的项目中发生了特定问题。我发现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