You need to add the android.permission.INTERNET to your manifest file. Read more about it here - http://code.google.com/android/reference/android/Manifest.permission.html
On Sat, Oct 25, 2008 at 1:08 PM, Eric Kolotyluk <[EMAIL PROTECTED]> wrote: > > OK, I'm just trying to open a socket with the following code > > Socket socket = new Socket("10.0.0.1", 40000); // line 63 > > but I get get the following exception > > E/OSNetworkSystem( 156): unknown socket error -1 > I/ActivityManager( 52): Start proc com.android.mms for broadcast > com.android.mms/.transaction.SmsReceiver: pid=163 uid=10008 gids={3003} > W/System.err( 156): java.net.SocketException: unknown error > W/System.err( 156): at > > org.apache.harmony.luni.platform.OSNetworkSystem.createSocketImpl(NativeMethod) > W/System.err( 156): at > > org.apache.harmony.luni.platform.OSNetworkSystem.createSocket(OSNetworkSystem.java:79) > W/System.err( 156): at > > org.apache.harmony.luni.net.PlainSocketImpl2.create(PlainSocketImpl2.java:59) > W/System.err( 156): at java.net.Socket.startupSocket(Socket.java:668) > W/System.err( 156): at java.net.Socket.<init>(Socket.java:142) > W/System.err( 156): at > com.android.kps.KpsClient.onCreate(KpsClient.java:63) > > I've tried using "localhost" and the IP address of my computer, I've > tried using other port numbers, but nothing seems to work. > > Is there some special trick to opening a socket on the Android emulator? > > Cheers, Eric > > > > > -- - Sunit Katkar --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---