java.lang.RuntimeException: Unable to start activity ComponentInfo{com.androidbegin.buttonclicktutorial/com.androidbegin.buttonclicktutorial.NewActivity}: android.os.NetworkOnMainThreadException

Stack Overflow | ring4 | 7 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

    Android activity2(XMLParser) force close when click button(activity1) on device

    Stack Overflow | 7 months ago | ring4
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.androidbegin.buttonclicktutorial/com.androidbegin.buttonclicktutorial.NewActivity}: android.os.NetworkOnMainThreadException
  2. 0

    Adding Login Form

    GitHub | 3 years ago | QwertyPong
    android.os.NetworkOnMainThreadException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Android get data from MySql table

    Stack Overflow | 3 years ago | roshanpeter
    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:1128)
    1 frame
  3. Java RT
    InetAddress.getAllByName
    1. java.net.InetAddress.lookupHostByName(InetAddress.java:385)
    2. java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
    3. java.net.InetAddress.getAllByName(InetAddress.java:214)
    3 frames
  4. Apache HttpClient
    AbstractHttpClient.execute
    1. org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
    2. org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
    3. org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
    4. org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:365)
    5. org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
    6. org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
    7. org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
    7 frames
  5. com.androidbegin.buttonclicktutorial
    XMLParser.getXmlFromUrl
    1. com.androidbegin.buttonclicktutorial.XMLParser.getXmlFromUrl(XMLParser.java:45)
    1 frame