Error logs . The application code is taken from an example . If you take this code and change it a bit under the usual IDEA in IDEA, then everything works. Example

Just starting to write for android, tell me, what's the problem?

    1 answer 1

    In android, you cannot go to the network from the main thread ( android.os.NetworkOnMainThreadException ). Use, for example, AsyncTask .