java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mkyong.android/com.mkyong.android.SimpleRSSReaderActivity}: android.os.NetworkOnMainThreadException

wordpress.com | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Creating A Simple RSS Application in Android – Android Research Blog

    wordpress.com | 6 months ago
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mkyong.android/com.mkyong.android.SimpleRSSReaderActivity}: android.os.NetworkOnMainThreadException
  2. 0

    Unable to start activity after return from background

    renren.io | 2 years ago
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.scl.tntmg/com.scl.tntmg.NowShowingActivity}: android.view.InflateException: Binary XML file line #9: Error inflating class fragment
  3. 0

    Android - how to download file from webserver

    Stack Overflow | 4 years ago | Iam4fun
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.demo/com.example.demo.MainActivity}: android.os.NetworkOnMainThreadException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Android : can't load my XML file and app crashes

    Stack Overflow | 5 years ago | Rob
    android.os.NetworkOnMainThreadException
  6. 0

    Java URL getContent Android

    Stack Overflow | 3 years ago | CamelopardalisRex
    android.os.NetworkOnMainThreadException
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. android.os.NetworkOnMainThreadException

    No message provided

    at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork()
  2. Android Platform
    StrictMode$AndroidBlockGuardPolicy.onNetwork
    1. android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099)
    1 frame
  3. Java RT
    InetAddress.getAllByName
    1. java.net.InetAddress.lookupHostByName(InetAddress.java:391)
    2. java.net.InetAddress.getAllByNameImpl(InetAddress.java:242)
    3. java.net.InetAddress.getAllByName(InetAddress.java:220)
    3 frames
  4. Android
    HttpURLConnectionImpl.getInputStream
    1. libcore.net.http.HttpConnection.<init>(HttpConnection.java:71)
    2. libcore.net.http.HttpConnection.<init>(HttpConnection.java:50)
    3. libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:351)
    4. libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:86)
    5. libcore.net.http.HttpConnection.connect(HttpConnection.java:128)
    6. libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:308)
    7. libcore.net.http.HttpEngine.connect(HttpEngine.java:303)
    8. libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:282)
    9. libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:232)
    10. libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:273)
    11. libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:168)
    11 frames
  5. com.mkyong.android
    SimpleRSSReaderActivity.onCreate
    1. com.mkyong.android.SimpleRSSReaderActivity.getInputStream(SimpleRSSReaderActivity.java:92)
    2. com.mkyong.android.SimpleRSSReaderActivity.onCreate(SimpleRSSReaderActivity.java:42)
    2 frames
  6. Android Platform
    ActivityThread.performLaunchActivity
    1. android.app.Activity.performCreate(Activity.java:4465)
    2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
    3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
    3 frames