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

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Unfortunately app has stopped -android
    via Stack Overflow by jonsnow
    ,
  • android login with php & sql server 2008
    via Stack Overflow by YVS1102
    ,
  • I would like to draw the bitmap turn a url?
    via Stack Overflow by Hamza Sonay
    ,
    • java.lang.RuntimeException: Unable to start activity ComponentInfo{com.hfad.viscosity/com.hfad.viscosity.ProcessData}: android.os.NetworkOnMainThreadException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2434) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2494) at android.app.ActivityThread.access$900(ActivityThread.java:157) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1356) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5525) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) Caused by: android.os.NetworkOnMainThreadException at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1273) at java.net.InetAddress.lookupHostByName(InetAddress.java:436) at java.net.InetAddress.getAllByNameImpl(InetAddress.java:252) at java.net.InetAddress.getAllByName(InetAddress.java:215) at com.android.okhttp.internal.Network$1.resolveInetAddresses(Network.java:29) at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:188) at com.android.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:157) at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:100) at com.android.okhttp.internal.http.HttpEngine.createNextConnection(HttpEngine.java:357) at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:340) at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330) at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:433) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:114) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:245) at com.hfad.viscosity.ProcessData.onCreate(ProcessData.java:110) at android.app.Activity.performCreate(Activity.java:6272) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2387)

    Users with the same issue

    Unknown visitor1 times, last one,
    bayukresno
    bayukresno2 times, last one,
    Unknown visitor1 times, last one,
    dmitry
    dmitry1 times, last one,
    Hiren Amaliyar
    Hiren Amaliyar5 times, last one,
    38 more bugmates