当我尝试在 android 中登录 twitter 应用程序时,它在 logcat 中显示以下错误。我无法通过我的应用程序启动 twitter。请给我一些解决方案。
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): Error creating consumer / provider
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: null
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:214)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at oauth.signpost.AbstractOAuthProvider.retrieveRequestToken(AbstractOAuthProvider.java:69)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at com.android.twitter.PrepareRequestTokenActivity.initData(PrepareRequestTokenActivity.java:129)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at com.android.twitter.PrepareRequestTokenActivity.onCreate(PrepareRequestTokenActivity.java:64)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at android.app.Activity.performCreate(Activity.java:4470)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1052)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at android.app.ActivityThread.access$600(ActivityThread.java:127)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at android.os.Handler.dispatchMessage(Handler.java:99)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at android.os.Looper.loop(Looper.java:137)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at android.app.ActivityThread.main(ActivityThread.java:4511)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at java.lang.reflect.Method.invokeNative(Native Method)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at java.lang.reflect.Method.invoke(Method.java:511)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at dalvik.system.NativeStart.main(Native Method)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): Caused by: android.os.NetworkOnMainThreadException
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at java.net.InetAddress.lookupHostByName(InetAddress.java:391)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:242)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at java.net.InetAddress.getAllByName(InetAddress.java:220)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at oauth.signpost.commonshttp.CommonsHttpOAuthProvider.sendRequest(CommonsHttpOAuthProvider.java:64)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:177)
03-18 12:47:28.412: E/com.android.twitter.PrepareRequestTokenActivity(4639): ... 17 more