java.lang.RuntimeException

Unable to start activity ComponentInfo{org.vaya_group.charactertest/org.vaya_group.charactertest.result}: 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 Stack Overflow by vaya-group
    ,
  • via Stack Overflow by stack16
    ,
  • Stack trace

    • java.lang.RuntimeException: Unable to start activity ComponentInfo{org.vaya_group.charactertest/org.vaya_group.charactertest.result}: android.os.NetworkOnMainThreadException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2071) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2096) at android.app.ActivityThread.access$600(ActivityThread.java:138) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1207) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:213) at android.app.ActivityThread.main(ActivityThread.java:4787) 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:789) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556) at dalvik.system.NativeStart.main(Native Method) Caused by: android.os.NetworkOnMainThreadException at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1126) at java.net.InetAddress.lookupHostByName(InetAddress.java:385) at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236) at java.net.InetAddress.getAllByName(InetAddress.java:214) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:141) at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164) at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465) at org.vaya_group.charactertest.result.onCreate(result.java:86) at android.app.Activity.performCreate(Activity.java:5008) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2035)

    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

    justCodeitjustCodeit
    34 times, last one
    MyInnosMyInnos
    4 times, last one
    Hiren AmaliyarHiren Amaliyar
    5 times, last one
    filpgamefilpgame
    Once,
    0x600x60
    Once,
    38 more bugmates