android.os.NetworkOnMainThreadException

This exception has no message.

Solutions on the web1209

  • via Coderanch by Chin Ginger, 6 months ago
    This exception has no message.
  • via GitHub by dasmikko
    , 1 year ago
    This exception has no message.
  • via GitHub by profOnno
    , 8 months ago
    This exception has no message.
  • Stack trace

    • android.os.NetworkOnMainThreadException at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1148) at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:84) at libcore.io.IoBridge.connectErrno(IoBridge.java:127) at libcore.io.IoBridge.connect(IoBridge.java:112) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.Socket.startupSocket(Socket.java:599) at java.net.Socket.tryAllAddresses(Socket.java:161) at java.net.Socket.<init>(Socket.java:211) at java.net.Socket.<init>(Socket.java:183) at com.example.siva.shivaproject.ClientSocket$1$1.run(ClientSocket.java:57) at java.lang.Thread.run(Thread.java:841) at com.example.siva.shivaproject.ClientSocket$1.onClick(ClientSocket.java:99) at android.view.View.performClick(View.java:4457) at android.view.View$PerformClick.run(View.java:18491) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5336) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:873) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:689) at dalvik.system.NativeStart.main(Native Method)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    6 times, 2 months ago
    6 times, 4 months ago
    7 times, 4 months ago
    4 times, 5 months ago
    2 times, 7 months ago
    38 more bugmates