java.lang.RuntimeException: Unable to start activity ComponentInfo{com.derp.herp/com.derp.herp.HerpderpActivity}: android.os.NetworkOnMainThreadException


Solutions on the web

Solution icon of appcelerator
via Appcelerator JIRA by Stefan Axelsson, 1 year ago
Unable to start activity ComponentInfo{com.derp.herp/com.derp.herp.HerpderpActivity}: android.os.NetworkOnMainThreadException

Solution icon of appcelerator
via Appcelerator JIRA by Stefan Axelsson, 1 year ago
Unable to start activity ComponentInfo{com.derp.herp/com.derp.herp.HerpderpActivity}: android.os.NetworkOnMainThreadException

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.androidhive.jsonparsing/com.androidhive.jsonparsing.AndroidJSONParsingActivity}: android.os.NetworkOnMainThreadException

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.example.json.pwd/com.example.json.pwd.AndroidJSONParsingActivity}: android.os.NetworkOnMainThreadException

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.threesixteenapps.treymorgan/com.threesixteenapps.treymorgan.CustomizedListView}: android.os.NetworkOnMainThreadException

Solution icon of stackoverflow
via Stack Overflow by magnuskahr
, 1 year ago
Unable to start activity ComponentInfo{com.androidhive.jsonparsing/com.androidhive.jsonparsing.AndroidJSONParsingActivity}: android.os.NetworkOnMainThreadException

Solution icon of stackoverflow
via Stack Overflow by aqeel
, 1 year ago
Unable to start activity ComponentInfo{mainpackage.rest_client/mainpackage.rest_client.GetResponse}: android.os.NetworkOnMainThreadException

Solution icon of stackoverflow
via Stack Overflow by homes
, 1 year ago
Unable to start activity ComponentInfo{com.example.test/com.example.test.MainActivity}: android.os.NetworkOnMainThreadException

Solution icon of stackoverflow
Unable to start activity ComponentInfo{com.aer.biblealive/com.aer.biblealive.MainActivity}: android.os.NetworkOnMainThreadException

Solution icon of stackoverflow
via Stack Overflow by Unknown author, 1 year ago
Unable to start activity ComponentInfo{com.example.pconnect/com.example.pconnect.LoginActivity}: android.os.NetworkOnMainThreadException

Stack trace

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.derp.herp/com.derp.herp.HerpderpActivity}: android.os.NetworkOnMainThreadException
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)[TiApplication( 1015)]
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)[TiApplication( 1015)]
	at android.app.ActivityThread.access$600(ActivityThread.java:130)[TiApplication( 1015)]
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)[TiApplication( 1015)]
	at android.os.Handler.dispatchMessage(Handler.java:99)[TiApplication( 1015)]
	at android.os.Looper.loop(Looper.java:137)[TiApplication( 1015)]
	at android.app.ActivityThread.main(ActivityThread.java:4745)[TiApplication( 1015)]
	at java.lang.reflect.Method.invokeNative(Native Method)[TiApplication( 1015)]
	at java.lang.reflect.Method.invoke(Method.java:511)[TiApplication( 1015)]
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)[TiApplication( 1015)]
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)[TiApplication( 1015)]
	at dalvik.system.NativeStart.main(Native Method)[TiApplication( 1015)]
Caused by: android.os.NetworkOnMainThreadException
	at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117)[TiApplication( 1015)]
	at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:163)[TiApplication( 1015)]
	at libcore.io.IoBridge.recvfrom(IoBridge.java:513)[TiApplication( 1015)]
	at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)[TiApplication( 1015)]
	at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)[TiApplication( 1015)]
	at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)[TiApplication( 1015)]
	at org.appcelerator.kroll.common.TiFastDev$Session.blockRead(TiFastDev.java:310)[TiApplication( 1015)]
	at org.appcelerator.kroll.common.TiFastDev$Session.readInt(TiFastDev.java:349)[TiApplication( 1015)]
	at org.appcelerator.kroll.common.TiFastDev$Session.readTokenCount(TiFastDev.java:412)[TiApplication( 1015)]
	at org.appcelerator.kroll.common.TiFastDev.openInputStream(TiFastDev.java:214)[TiApplication( 1015)]
	at org.appcelerator.kroll.util.KrollAssetHelper.readAsset(KrollAssetHelper.java:53)[TiApplication( 1015)]
	at org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:104)[TiApplication( 1015)]
	at org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:152)[TiApplication( 1015)]
	at org.appcelerator.titanium.TiRootActivity.windowCreated(TiRootActivity.java:109)[TiApplication( 1015)]
	at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:502)[TiApplication( 1015)]
	at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:145)[TiApplication( 1015)]
	at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:97)[TiApplication( 1015)]
	at android.app.Activity.performCreate(Activity.java:5008)[TiApplication( 1015)]
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)[TiApplication( 1015)]
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)[TiApplication( 1015)]
	... 11 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Once, 1 year ago
8 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
3 times, 1 year ago
3 times, 3 months ago
38 more bugmates