我收到此错误。
10-03 03:20:54.995: E/AndroidRuntime(1422): FATAL EXCEPTION: main
10-03 03:20:54.995: E/AndroidRuntime(1422): android.os.NetworkOnMainThreadException
10-03 03:20:54.995: E/AndroidRuntime(1422): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1133)
10-03 03:20:54.995: E/AndroidRuntime(1422): at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
10-03 03:20:54.995: E/AndroidRuntime(1422): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
10-03 03:20:54.995: E/AndroidRuntime(1422): at java.net.InetAddress.getAllByName(InetAddress.java:214)
10-03 03:20:54.995: E/AndroidRuntime(1422): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
10-03 03:20:54.995: E/AndroidRuntime(1422): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
10-03 03:20:54.995: E/AndroidRuntime(1422): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
10-03 03:20:54.995: E/AndroidRuntime(1422): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
10-03 03:20:54.995: E/AndroidRuntime(1422): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
10-03 03:20:54.995: E/AndroidRuntime(1422): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
10-03 03:20:54.995: E/AndroidRuntime(1422): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
10-03 03:20:54.995: E/AndroidRuntime(1422): at com.infotrans.library.JSONParser.getJSONFromUrl(JSONParser.java:142)
10-03 03:20:54.995: E/AndroidRuntime(1422): at com.infotrans.library.UserFunctions.registerUser(UserFunctions.java:58)
10-03 03:20:54.995: E/AndroidRuntime(1422): at com.infotrans.snapjug.activity.RegisterActivity.saveLoginDetails(RegisterActivity.java:132)
10-03 03:20:54.995: E/AndroidRuntime(1422): at com.infotrans.snapjug.activity.RegisterActivity.onClick(RegisterActivity.java:85)
10-03 03:20:54.995: E/AndroidRuntime(1422): at android.view.View.performClick(View.java:4240)
10-03 03:20:54.995: E/AndroidRuntime(1422): at android.view.View$PerformClick.run(View.java:17721)
10-03 03:20:54.995: E/AndroidRuntime(1422): at android.os.Handler.handleCallback(Handler.java:730)
10-03 03:20:54.995: E/AndroidRuntime(1422): at android.os.Handler.dispatchMessage(Handler.java:92)
10-03 03:20:54.995: E/AndroidRuntime(1422): at android.os.Looper.loop(Looper.java:137)
10-03 03:20:54.995: E/AndroidRuntime(1422): at android.app.ActivityThread.main(ActivityThread.java:5103)
10-03 03:20:54.995: E/AndroidRuntime(1422): at java.lang.reflect.Method.invokeNative(Native Method)
10-03 03:20:54.995: E/AndroidRuntime(1422): at java.lang.reflect.Method.invoke(Method.java:525)
10-03 03:20:54.995: E/AndroidRuntime(1422): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
10-03 03:20:54.995: E/AndroidRuntime(1422): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
10-03 03:20:54.995: E/AndroidRuntime(1422): at dalvik.system.NativeStart.main(Native Method)