android.os.NetworkOnMainThreadException

Stack Overflow | Ruban Felix | 3 months ago
  1. 0

    cannot connect to the socket: NetworkOnMainThreadException

    Stack Overflow | 3 months ago | Ruban Felix
    android.os.NetworkOnMainThreadException
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Android Socket Client didn't send and closes itself

    Stack Overflow | 4 years ago | Lukas5060
    android.os.NetworkOnMainThreadException

  1. dealloc 2 times, last 1 week ago
  2. Alexandru Popa 3 times, last 2 weeks ago
  3. filpgame 1 times, last 3 weeks ago
  4. jk 5 times, last 7 months ago
  5. zildjiandm 2 times, last 8 months ago
12 more registered users
21 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. android.os.NetworkOnMainThreadException

    No message provided

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