GetAllNetworkInterfaces()抛出异常 [英] GetAllNetworkInterfaces() throws exception
本文介绍了GetAllNetworkInterfaces()抛出异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在单为Android我试图获取所有的IP地址在本地网络中的我的设备。
In Mono for Android I'm trying to obtain all the IP addresses for my device within the local network.
我不介意,但环回我没有兴趣,呼吁DNS。
I don't mind loopbacks but I'm not interested in calling DNS.
最好的办法似乎是调用...
The best way seems to be calling...
using System.Net.NetworkInformation;
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces();
...除了它抛出...
...except it throws...
System.EntryPointNotFoundException:getifaddrs
System.EntryPointNotFoundException: getifaddrs
有什么建议?
推荐答案
不幸的是,这是在单一个已知的bug为Android。该错误报告可这里。
Unfortunately this is a known bug in Mono for Android. The bug report is available here.
这篇关于GetAllNetworkInterfaces()抛出异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文