我正在尝试为Android创建following自动化应用程序。
但是在按下“登录”按钮后,我看到progressDialog“登录”,然后是alertDialog“登录时出错。请稍后再试”。
在我的LogCat中,我可以看到:
INFO/ActivityManager(88): Displayed activity com.facebook.katana/.LoginActivity: 1505 ms (total 5499 ms)
DEBUG/dalvikvm(222): GC_EXPLICIT freed 704 objects / 39192 bytes in 163ms
ERROR/HttpOperation.run(1226): class org.apache.http.conn.ConnectTimeoutException Connect to /69.171.224.20:443 timed out [https://api.facebook.com/restserver.php?api_key=882a8490361da98702bf97a021ddc14d&email=artem.chilin%40gmail.com&format=JSON&method=auth.login&migrations_override=%7B%27empty_json%27%3A+true%7D&password=******&sig=a59e0d73af109b2f70e7682b17206cf1&v=1.0]
ERROR/HttpOperation(1226): Encountered exception: org.apache.http.conn.ConnectTimeoutException: Connect to /69.171.224.20:443 timed out
WARN/System.err(1226): org.apache.http.conn.ConnectTimeoutException: Connect to /69.171.224.20:443 timed out
WARN/System.err(1226): at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121)
WARN/System.err(1226): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:143)
WARN/System.err(1226): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
WARN/System.err(1226): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
WARN/System.err(1226): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:348)
WARN/System.err(1226): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
WARN/System.err(1226): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
WARN/System.err(1226): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
WARN/System.err(1226): at com.facebook.katana.service.method.HttpOperation.run(HttpOperation.java:163)
WARN/InputManagerService(88): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4507c230
注意:我有一个代理人。我已将它设置在settengs / wireless和networks / mobile networks / apns中,我可以使用默认的android浏览器访问facebook。
答案 0 :(得分:1)
LogCat告诉您,您有一个ConnectionTimeoutError。我想你的代理太慢了
答案 1 :(得分:1)
在FacebookConnector.java类中,将com.facebook.katana更改为com.facebook.katana2。更改代理服务器名称对我有用