你好,有人可以帮忙吗?
logcat的
09-10 08:46:55.075: E/AndroidRuntime(1061): FATAL EXCEPTION: main
09-10 08:46:55.075: E/AndroidRuntime(1061): Process: com.example.api, PID: 1061
09-10 08:46:55.075: E/AndroidRuntime(1061): android.os.NetworkOnMainThreadException
09-10 08:46:55.075: E/AndroidRuntime(1061): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1145)
09-10 08:46:55.075: E/AndroidRuntime(1061): at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
09-10 08:46:55.075: E/AndroidRuntime(1061): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
09-10 08:46:55.075: E/AndroidRuntime(1061): at java.net.InetAddress.getAllByName(InetAddress.java:214)
09-10 08:46:55.075: E/AndroidRuntime(1061): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
09-10 08:46:55.075: E/AndroidRuntime(1061): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
09-10 08:46:55.075: E/AndroidRuntime(1061): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
09-10 08:46:55.075: E/AndroidRuntime(1061): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
09-10 08:46:55.075: E/AndroidRuntime(1061): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
09-10 08:46:55.075: E/AndroidRuntime(1061): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
09-10 08:46:55.075: E/AndroidRuntime(1061): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
09-10 08:46:55.075: E/AndroidRuntime(1061): at com.example.api.MainActivity.send(MainActivity.java:81)
09-10 08:46:55.075: E/AndroidRuntime(1061): at com.example.api.MainActivity$1.onClick(MainActivity.java:56)
09-10 08:46:55.075: E/AndroidRuntime(1061): at android.view.View.performClick(View.java:4424)
09-10 08:46:55.075: E/AndroidRuntime(1061): at android.view.View$PerformClick.run(View.java:18383)
09-10 08:46:55.075: E/AndroidRuntime(1061): at android.os.Handler.handleCallback(Handler.java:733)
09-10 08:46:55.075: E/AndroidRuntime(1061): at android.os.Handler.dispatchMessage(Handler.java:95)
09-10 08:46:55.075: E/AndroidRuntime(1061): at android.os.Looper.loop(Looper.java:137)
09-10 08:46:55.075: E/AndroidRuntime(1061): at android.app.ActivityThread.main(ActivityThread.java:4998)
09-10 08:46:55.075: E/AndroidRuntime(1061): at java.lang.reflect.Method.invokeNative(Native Method)
09-10 08:46:55.075: E/AndroidRuntime(1061): at java.lang.reflect.Method.invoke(Method.java:515)
09-10 08:46:55.075: E/AndroidRuntime(1061): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
09-10 08:46:55.075: E/AndroidRuntime(1061): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
09-10 08:46:55.075: E/AndroidRuntime(1061): at dalvik.system.NativeStart.main(Native Method)
09-10 08:46:57.295: I/Process(1061): Sending signal. PID: 1061 SIG: 9