主持人尚未解决:api。 facebook.com:443

时间:2013-01-10 09:58:55

标签: android

我在logcat中收到“Host is unresolved:api.facebook.com:443”错误 而我试图从我的Android应用程序授权Facebook。 知道为什么会这样吗?

Log cat:

01-10 15:28:55.891: E/Facebook(1084): Host is unresolved: api.facebook.com:443
01-10 15:28:55.918: W/System.err(1084): java.net.UnknownHostException: Host is unresolved: api.facebook.com:443
01-10 15:28:55.938: W/System.err(1084):     at java.net.Socket.connect(Socket.java:1038)
01-10 15:28:55.938: W/System.err(1084):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.<init>(HttpConnection.java:62)
01-10 15:28:55.938: W/System.err(1084):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get(HttpConnectionPool.java:88)
01-10 15:28:56.047: W/System.err(1084):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHTTPConnection(HttpURLConnectionImpl.java:927)
01-10 15:28:56.047: W/System.err(1084):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:909)
01-10 15:28:56.047: W/System.err(1084):     at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:396)
01-10 15:28:56.047: W/System.err(1084):     at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:147)
01-10 15:28:56.088: W/System.err(1084):     at com.facebook.android.Util.openUrl(Util.java:178)
01-10 15:28:56.088: W/System.err(1084):     at com.facebook.android.Facebook.request(Facebook.java:559)
01-10 15:28:56.088: W/System.err(1084):     at com.facebook.android.AsyncFacebookRunner$2.run(AsyncFacebookRunner.java:253)

1 个答案:

答案 0 :(得分:1)

您需要在AndroidManifest.xml <uses-permission>使用android.permission.INTERNET