04-07 16:35:52.393: W/dalvikvm(2220): threadid=1: thread exiting with uncaught exception (group=0x409ea1f8)
04-07 16:35:52.393: E/AndroidRuntime(2220): FATAL EXCEPTION: main
04-07 16:35:52.393: E/AndroidRuntime(2220): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lin.socket/com.lin.socket.MainActivity2}: android.os.NetworkOnMainThreadException
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.app.ActivityThread.access$600(ActivityThread.java:123)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.os.Handler.dispatchMessage(Handler.java:99)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.os.Looper.loop(Looper.java:137)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.app.ActivityThread.main(ActivityThread.java:4424)
04-07 16:35:52.393: E/AndroidRuntime(2220): at java.lang.reflect.Method.invokeNative(Native Method)
04-07 16:35:52.393: E/AndroidRuntime(2220): at java.lang.reflect.Method.invoke(Method.java:511)
04-07 16:35:52.393: E/AndroidRuntime(2220): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
04-07 16:35:52.393: E/AndroidRuntime(2220): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
04-07 16:35:52.393: E/AndroidRuntime(2220): at dalvik.system.NativeStart.main(Native Method)
04-07 16:35:52.393: E/AndroidRuntime(2220): Caused by: android.os.NetworkOnMainThreadException
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099)
04-07 16:35:52.393: E/AndroidRuntime(2220): at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:84)
04-07 16:35:52.393: E/AndroidRuntime(2220): at libcore.io.IoBridge.connectErrno(IoBridge.java:127)
04-07 16:35:52.393: E/AndroidRuntime(2220): at libcore.io.IoBridge.connect(IoBridge.java:112)
04-07 16:35:52.393: E/AndroidRuntime(2220): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
04-07 16:35:52.393: E/AndroidRuntime(2220): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
04-07 16:35:52.393: E/AndroidRuntime(2220): at java.net.Socket.startupSocket(Socket.java:566)
04-07 16:35:52.393: E/AndroidRuntime(2220): at java.net.Socket.tryAllAddresses(Socket.java:127)
04-07 16:35:52.393: E/AndroidRuntime(2220): at java.net.Socket.<init>(Socket.java:177)
04-07 16:35:52.393: E/AndroidRuntime(2220): at java.net.Socket.<init>(Socket.java:149)
04-07 16:35:52.393: E/AndroidRuntime(2220): at com.lin.socket.MainActivity2.onCreate(MainActivity2.java:31)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.app.Activity.performCreate(Activity.java:4492)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
04-07 16:35:52.393: E/AndroidRuntime(2220): ... 11 more
04-07 16:35:52.393: E/AndroidRuntime(2220): FATAL EXCEPTION: main
04-07 16:35:52.393: E/AndroidRuntime(2220): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lin.socket/com.lin.socket.MainActivity2}: android.os.NetworkOnMainThreadException
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.app.ActivityThread.access$600(ActivityThread.java:123)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.os.Handler.dispatchMessage(Handler.java:99)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.os.Looper.loop(Looper.java:137)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.app.ActivityThread.main(ActivityThread.java:4424)
04-07 16:35:52.393: E/AndroidRuntime(2220): at java.lang.reflect.Method.invokeNative(Native Method)
04-07 16:35:52.393: E/AndroidRuntime(2220): at java.lang.reflect.Method.invoke(Method.java:511)
04-07 16:35:52.393: E/AndroidRuntime(2220): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
04-07 16:35:52.393: E/AndroidRuntime(2220): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
04-07 16:35:52.393: E/AndroidRuntime(2220): at dalvik.system.NativeStart.main(Native Method)
04-07 16:35:52.393: E/AndroidRuntime(2220): Caused by: android.os.NetworkOnMainThreadException
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099)
04-07 16:35:52.393: E/AndroidRuntime(2220): at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:84)
04-07 16:35:52.393: E/AndroidRuntime(2220): at libcore.io.IoBridge.connectErrno(IoBridge.java:127)
04-07 16:35:52.393: E/AndroidRuntime(2220): at libcore.io.IoBridge.connect(IoBridge.java:112)
04-07 16:35:52.393: E/AndroidRuntime(2220): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
04-07 16:35:52.393: E/AndroidRuntime(2220): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
04-07 16:35:52.393: E/AndroidRuntime(2220): at java.net.Socket.startupSocket(Socket.java:566)
04-07 16:35:52.393: E/AndroidRuntime(2220): at java.net.Socket.tryAllAddresses(Socket.java:127)
04-07 16:35:52.393: E/AndroidRuntime(2220): at java.net.Socket.<init>(Socket.java:177)
04-07 16:35:52.393: E/AndroidRuntime(2220): at java.net.Socket.<init>(Socket.java:149)
04-07 16:35:52.393: E/AndroidRuntime(2220): at com.lin.socket.MainActivity2.onCreate(MainActivity2.java:31)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.app.Activity.performCreate(Activity.java:4492)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
04-07 16:35:52.393: E/AndroidRuntime(2220): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
04-07 16:35:52.393: E/AndroidRuntime(2220): ... 11 more