Skip to content Skip to sidebar Skip to footer

Fatal Exception In Android

i have written simple client server socket programming code as follow MyServer.java import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException;

Solution 1:

You are acessing network on main application thread. This is not allowed in Android 3+. You need to start separate thread do access network.

You can use AsyncTask to separate your code, which is acessing network, to another Thread.

Post a Comment for "Fatal Exception In Android"