java.lang.RuntimeException: Unable to start activity ComponentInfo{com.avian.apps.avian/com.avian.apps.avian.LoginActivity}: android.os.NetworkOnMainThreadException

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Stack Overflow by Agoeng Liu
, 1 year ago
Unable to start activity ComponentInfo{com.avian.apps.avian/com.avian.apps.avian.LoginActivity}: android.os.NetworkOnMainThreadException
via Appcelerator JIRA by Stefan Axelsson, 1 year ago
Unable to start activity ComponentInfo{com.derp.herp/com.derp.herp.HerpderpActivity}: android.os.NetworkOnMainThreadException
via Stack Overflow by Mohit
, 2 years ago
Unable to start activity ComponentInfo{com.androidhive.jsonparsing/com.androidhive.jsonparsing.AndroidJSONParsingActivity}: android.os.NetworkOnMainThreadException
via Stack Overflow by michalsol
, 2 years ago
Unable to start activity ComponentInfo{com.example.testy/com.example.testy.MainActivity}: android.os.NetworkOnMainThreadException
via Stack Overflow by Droid Beginner
, 2 years ago
Unable to start activity ComponentInfo{in.wptrafficanalyzer.actionbarsherlocknavtab/in.wptrafficanalyzer.actionbarsherlocknavtab.MainActivity}: android.os.NetworkOnMainThreadException
via Stack Overflow by Mac
, 2 years ago
Unable to start activity ComponentInfo{com.example.json.mapview/com.example.json.mapview.Main}: android.os.NetworkOnMainThreadException
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.avian.apps.avian/com.avian.apps.avian.LoginActivity}: android.os.NetworkOnMainThreadException
at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:84)
at libcore.io.IoBridge.connectErrno(IoBridge.java:131)
at libcore.io.IoBridge.connect(IoBridge.java:116)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
at java.net.Socket.connect(Socket.java:847)
at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:288)
at net.sourceforge.jtds.jdbc.SharedSocket.(SharedSocket.java:251)
at net.sourceforge.jtds.jdbc.JtdsConnection.(JtdsConnection.java:331)
at java.sql.DriverManager.getConnection(DriverManager.java:175)
at java.sql.DriverManager.getConnection(DriverManager.java:209)
at com.avian.apps.avian.ConnectionClass.getConnection(ConnectionClass.java:25)
at com.avian.apps.avian.LoginActivity.onCreate(LoginActivity.java:36)
at android.app.Activity.performCreate(Activity.java:5117)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1081)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2150)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2236)
at android.app.ActivityThread.access$600(ActivityThread.java:145)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1238)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5099)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:803)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
6 times, 6 months ago
6 times, 8 months ago
7 times, 8 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.