java.lang.RuntimeException: Unable to start activity ComponentInfo{com.hfad.viscosity/com.hfad.viscosity.ProcessData}: android.os.NetworkOnMainThreadException

Stack Overflow | Hamza Khan | 4 months ago
  1. 0

    I am getting an error on getInputStream() and getOutputStream methods?

    Stack Overflow | 4 months ago | Hamza Khan
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.hfad.viscosity/com.hfad.viscosity.ProcessData}: android.os.NetworkOnMainThreadException
  2. 0

    Unfortunately app has stopped -android

    Stack Overflow | 6 months ago | jonsnow
    android.os.NetworkOnMainThreadException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    android login with php & sql server 2008

    Stack Overflow | 5 days ago | YVS1102
    android.os.NetworkOnMainThreadException
  5. 0

    Android <uses-permission> not requesting permission

    Stack Overflow | 4 months ago | Giorgio L
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.neo.gson/com.example.neo.gson.MainActivity}: android.os.NetworkOnMainThreadException

  1. bayukresno 2 times, last 8 months ago
  2. dmitry 1 times, last 8 months ago
  3. 0x60 1 times, last 2 months ago
  4. adawolfs 4 times, last 4 months ago
  5. Bassiuz 1 times, last 5 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:1273)
    1 frame
  3. Java RT
    InetAddress.getAllByName
    1. java.net.InetAddress.lookupHostByName(InetAddress.java:436)
    2. java.net.InetAddress.getAllByNameImpl(InetAddress.java:252)
    3. java.net.InetAddress.getAllByName(InetAddress.java:215)
    3 frames
  4. Android
    HttpEngine.sendRequest
    1. com.android.okhttp.internal.Network$1.resolveInetAddresses(Network.java:29)
    2. com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:188)
    3. com.android.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:157)
    4. com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:100)
    5. com.android.okhttp.internal.http.HttpEngine.createNextConnection(HttpEngine.java:357)
    6. com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:340)
    7. com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
    8. com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
    8 frames
  5. com.android.okhttp
    HttpURLConnectionImpl.getOutputStream
    1. com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:433)
    2. com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:114)
    3. com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:245)
    3 frames
  6. com.hfad.viscosity
    ProcessData.onCreate
    1. com.hfad.viscosity.ProcessData.onCreate(ProcessData.java:110)
    1 frame
  7. Android Platform
    ActivityThread.performLaunchActivity
    1. android.app.Activity.performCreate(Activity.java:6272)
    2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
    3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2387)
    3 frames