访问 api.twitter.com 时出现 UnknownHostException
我正在尝试访问这里的公共推特列表,
通过 HttpClient 从 Android 应用程序:
http://api.twitter.com/ 1/statuses/public_timeline.json
我保留连接时出现异常:
java.net.UnknownHostException: api.twitter.com
为什么会发生这种情况?
我该如何解决这个问题?
谢谢
I'm trying to access this list of public twitts here,
from an android application through a HttpClient:
http://api.twitter.com/1/statuses/public_timeline.json
I keep getting an Exception when connecting:
java.net.UnknownHostException: api.twitter.com
Why is this happening?
How can I fix this?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保您已将 INTERNET 权限添加到清单中。
Make sure you have the INTERNET permission added to your manifest.