java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.pjha.app2/com.example.pjha.app2.MainActivity}: _**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 GitHub by prafulkumarjha
, 1 year ago
Unable to start activity ComponentInfo{com.example.pjha.app2/com.example.pjha.app2.MainActivity}: _**android.os.NetworkOnMainThreadException**_
via Stack Overflow by Solo
, 4 months ago
Unable to start activity ComponentInfo{SignUp}: android.os.NetworkOnMainThreadException
via Stack Overflow by Fajar Khan
, 1 year ago
Unable to start activity ComponentInfo{com.newleaf.twitniceappl/com.newleaf.twitniceappl.TwitNiceActivity}: android.os.NetworkOnMainThreadException
via Stack Overflow by R3J3CT3D
, 1 year ago
Unable to start activity ComponentInfo{com.r3j3ct3d.apkofee/com.r3j3ct3d.apkofee.MainActivity}: android.os.NetworkOnMainThreadException
via Stack Overflow by João Castilho
, 1 year ago
Unable to start activity ComponentInfo{com.example.martins.highcards/com.example.martins.highcards.OnlineGame}: android.os.NetworkOnMainThreadException
via Stack Overflow by miatech
, 9 months ago
Unable to start activity ComponentInfo{com.example.george.droidnet/com.example.george.droidnet.TcpConfigActivity}: android.os.NetworkOnMainThreadException
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.pjha.app2/com.example.pjha.app2.MainActivity}: _**android.os.NetworkOnMainThreadException**_
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
10 times, 1 year ago
114 times, 1 year ago
16 times, 11 months ago
6 times, 1 year ago

Write tip

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