在第 215 行的 util 类上的 android facebook 代码中出现异常这里我打印堆栈:
04-05 11:08:34.015: E/AndroidRuntime(13527): FATAL EXCEPTION: main
04-05 11:08:34.015: E/AndroidRuntime(13527): android.os.NetworkOnMainThreadException
04-05 11:08:34.015: E/AndroidRuntime(13527): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117)
04-05 11:08:34.015: E/AndroidRuntime(13527): at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
04-05 11:08:34.015: E/AndroidRuntime(13527): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
04-05 11:08:34.015: E/AndroidRuntime(13527): at java.net.InetAddress.getAllByName(InetAddress.java:214)
04-05 11:08:34.015: E/AndroidRuntime(13527): at libcore.net.http.HttpConnection.<init>(HttpConnection.java:70)
04-05 11:08:34.015: E/AndroidRuntime(13527): at libcore.net.http.HttpConnection.<init>(HttpConnection.java:50)
04-05 11:08:34.015: E/AndroidRuntime(13527): at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:341)
04-05 11:08:34.015: E/AndroidRuntime(13527): at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:87)
04-05 11:08:34.015: E/AndroidRuntime(13527): at libcore.net.http.HttpConnection.connect(HttpConnection.java:128)
04-05 11:08:34.015: E/AndroidRuntime(13527): at libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:315)
04-05 11:08:34.015: E/AndroidRuntime(13527): at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:461)
04-05 11:08:34.015: E/AndroidRuntime(13527): at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:433)
04-05 11:08:34.015: E/AndroidRuntime(13527): at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:289)
04-05 11:08:34.015: E/AndroidRuntime(13527): at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:239)
04-05 11:08:34.015: E/AndroidRuntime(13527): at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:273)
04-05 11:08:34.015: E/AndroidRuntime(13527): at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:168)
04-05 11:08:34.015: E/AndroidRuntime(13527): at libcore.net.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:271)
04-05 11:08:34.015: E/AndroidRuntime(13527): at com.facebook.android.Util.openUrl(Util.java:215)
04-05 11:08:34.015: E/AndroidRuntime(13527): at com.facebook.android.Facebook.request(Facebook.java:755)
04-05 11:08:34.015: E/AndroidRuntime(13527): at com.facebook.android.Facebook.request(Facebook.java:692)
04-05 11:08:34.015: E/AndroidRuntime(13527): at com.agequiz.fbhelper.FacebookConnector$1.onAuthSucceed(FacebookConnector.java:184)
04-05 11:08:34.015: E/AndroidRuntime(13527): at com.agequiz.fbhelper.SessionEvents.onLoginSuccess(SessionEvents.java:78)
04-05 11:08:34.015: E/AndroidRuntime(13527): at com.agequiz.fbhelper.FacebookConnector$LoginDialogListener.onComplete(FacebookConnector.java:112)
04-05 11:08:34.015: E/AndroidRuntime(13527): at com.facebook.android.Facebook$1.onComplete(Facebook.java:358)
04-05 11:08:34.015: E/AndroidRuntime(13527): at com.facebook.android.FbDialog$FbWebViewClient.shouldOverrideUrlLoading(FbDialog.java:154)
04-05 11:08:34.015: E/AndroidRuntime(13527): at android.webkit.CallbackProxy.uiOverrideUrlLoading(CallbackProxy.java:274)
04-05 11:08:34.015: E/AndroidRuntime(13527): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:376)
04-05 11:08:34.015: E/AndroidRuntime(13527): at android.os.Handler.dispatchMessage(Handler.java:99)
04-05 11:08:34.015: E/AndroidRuntime(13527): at android.os.Looper.loop(Looper.java:137)
04-05 11:08:34.015: E/AndroidRuntime(13527): at android.app.ActivityThread.main(ActivityThread.java:4745)
04-05 11:08:34.015: E/AndroidRuntime(13527): at java.lang.reflect.Method.invokeNative(Native Method)
04-05 11:08:34.015: E/AndroidRuntime(13527): at java.lang.reflect.Method.invoke(Method.java:511)
04-05 11:08:34.015: E/AndroidRuntime(13527): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
04-05 11:08:34.015: E/AndroidRuntime(13527): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
04-05 11:08:34.015: E/AndroidRuntime(13527): at dalvik.system.NativeStart.main(Native Method)