java.lang.RuntimeException

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

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web1167

  • via Unknown by Stefan Axelsson,
  • via Unknown by Stefan Axelsson,
  • 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

    adawolfsadawolfs
    Once,
    jkjk
    8 times, last one
    Unknown visitor
    Unknown visitorOnce,
    MyInnosMyInnos
    3 times, last one
    Hiren AmaliyarHiren Amaliyar
    3 times, last one
    38 more bugmates