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

Stack Overflow | Hamza Khan | 6 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

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

    Stack Overflow | 6 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 | 8 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 | 3 months ago | YVS1102
    android.os.NetworkOnMainThreadException
  5. 0

    Android <uses-permission> not requesting permission

    Stack Overflow | 6 months ago | Giorgio L
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.neo.gson/com.example.neo.gson.MainActivity}: android.os.NetworkOnMainThreadException
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