android.os.NetworkOnMainThreadException

Stack Overflow | programforjoy | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    GitHub comment 1815#134235126

    GitHub | 2 years ago | tuhin10
    android.os.NetworkOnMainThreadException
  2. 0

    NetworkOnMainThreadException when using glide with adapter view

    Stack Overflow | 1 year ago | user782104
    android.os.NetworkOnMainThreadException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    [Question] $Proxy1.getProfessionalProfile(Unknown Source)

    GitHub | 2 years ago | Salma7amed
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.hipolink.application/com.hipolink.activities.MainActivity}: retrofit.RetrofitError
  5. 0

    How to submit form with values using jsoup?

    Stack Overflow | 2 years ago | Agustin Scalisi
    android.os.NetworkOnMainThreadException

  1. adawolfs 1 times, last 7 months ago
  2. jk 7 times, last 7 months ago
  3. MyInnos 3 times, last 10 months ago
  4. Diogo Jaym 1 times, last 8 months ago
  5. bayukresno 3 times, last 10 months ago
15 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:1147)
    1 frame
  3. Android
    IoBridge.recvfrom
    1. libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:249)
    2. libcore.io.IoBridge.recvfrom(IoBridge.java:553)
    2 frames
  4. Java RT
    PlainSocketImpl$PlainSocketInputStream.read
    1. java.net.PlainSocketImpl.read(PlainSocketImpl.java:485)
    2. java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37)
    3. java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237)
    3 frames
  5. Okio
    RealBufferedSource.read
    1. okio.Okio$2.read(Okio.java:139)
    2. okio.AsyncTimeout$2.read(AsyncTimeout.java:211)
    3. okio.RealBufferedSource.read(RealBufferedSource.java:50)
    3 frames
  6. okhttp3.internal.http
    Http1xStream$FixedLengthSource.read
    1. okhttp3.internal.http.Http1xStream$FixedLengthSource.read(Http1xStream.java:381)
    1 frame
  7. okhttp3.internal
    Util.discard
    1. okhttp3.internal.Util.skipAll(Util.java:178)
    2. okhttp3.internal.Util.discard(Util.java:160)
    2 frames
  8. okhttp3.internal.http
    Http1xStream$FixedLengthSource.close
    1. okhttp3.internal.http.Http1xStream$FixedLengthSource.close(Http1xStream.java:397)
    1 frame
  9. Okio
    RealBufferedSource$1.close
    1. okio.RealBufferedSource.close(RealBufferedSource.java:396)
    2. okio.ForwardingSource.close(ForwardingSource.java:43)
    3. okio.RealBufferedSource.close(RealBufferedSource.java:396)
    4. okio.RealBufferedSource$1.close(RealBufferedSource.java:384)
    4 frames
  10. com.testapp.apkinstall
    MainActivity$1$1.onResponse
    1. com.testapp.apkinstall.MainActivity.writeResponseBodyToDisk(MainActivity.java:87)
    2. com.testapp.apkinstall.MainActivity.access$000(MainActivity.java:24)
    3. com.testapp.apkinstall.MainActivity$1$1.onResponse(MainActivity.java:42)
    3 frames
  11. retrofit2
    ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run
    1. retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:68)
    1 frame
  12. Android Platform
    ActivityThread.main
    1. android.os.Handler.handleCallback(Handler.java:739)
    2. android.os.Handler.dispatchMessage(Handler.java:95)
    3. android.os.Looper.loop(Looper.java:135)
    4. android.app.ActivityThread.main(ActivityThread.java:5254)
    4 frames
  13. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:372)
    2 frames
  14. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
    2 frames