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

Stack Overflow | Lizzie | 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 FTP: Cannot connect to Server

    Stack Overflow | 7 months ago | Lizzie
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.uploadtonas_03/com.uploadtonas_03.MainActivity}: android.os.NetworkOnMainThreadException
  2. 0

    Downloading txt file from ftp server

    Stack Overflow | 2 years ago | Ihara
    android.os.NetworkOnMainThreadException
  3. 0

    Android FTP connection problems

    Stack Overflow | 2 years ago | deportes
    android.os.NetworkOnMainThreadException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Send email in background

    Stack Overflow | 2 years ago | Reshmin
    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:1133)
    1 frame
  3. Java RT
    InetAddress.getByName
    1. java.net.InetAddress.lookupHostByName(InetAddress.java:385)
    2. java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
    3. java.net.InetAddress.getByName(InetAddress.java:289)
    3 frames
  4. Commons Net
    SocketClient.connect
    1. org.apache.commons.net.SocketClient.connect(SocketClient.java:209)
    1 frame
  5. com.uploadtonas_03
    MainActivity.onCreate
    1. com.uploadtonas_03.MainActivity.onCreate(MainActivity.java:24)
    1 frame
  6. Android Platform
    ActivityThread.performLaunchActivity
    1. android.app.Activity.performCreate(Activity.java:5133)
    2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
    3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2214)
    3 frames