java.lang.RuntimeException

Unable to start activity ComponentInfo{k.k.k/k.k.k.KrishnaActivity}: android.os.NetworkOnMainThreadException

Samebug tips1

Try loading the text file into a WebView, then printing the contents of the WebView.

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

Solutions on the web4214

  • via Unknown by Unknown author,
  • via Stack Overflow by Meghs
    ,
  • Stack trace

    • java.lang.RuntimeException: Unable to start activity ComponentInfo{k.k.k/k.k.k.KrishnaActivity}: android.os.NetworkOnMainThreadException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) at android.app.ActivityThread.access$600(ActivityThread.java:123) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4424) 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:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method)

    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

    filipebatistafilipebatista
    9 times, last one
    Hiren AmaliyarHiren Amaliyar
    2 times, last one
    AravindAravind
    9 times, last one
    Unknown visitor
    Unknown visitor2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    207 more bugmates