开发者

UnknownHostException when accessing api.twitter.com

开发者 https://www.devze.com 2023-01-22 10:11 出处:网络
I\'m trying to access this list of public twitts here, from an android appli开发者_运维知识库cation through a HttpClient:

I'm trying to access this list of public twitts here,

from an android appli开发者_运维知识库cation 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


Make sure you have the INTERNET permission added to your manifest.

<uses-permission
    android:name="android.permission.INTERNET" />
0

精彩评论

暂无评论...
验证码 换一张
取 消