1. Are you ready for the Galaxy S20? Here is everything we know so far!

Source not found

Discussion in 'Android Apps & Games' started by abhimohpra, Sep 16, 2011.

  1. abhimohpra

    abhimohpra Lurker
    Thread Starter

    Hello,

    I am newbie to Android. I am working on Android and Eclipse on the linux ubuntu platform.

    I am trying to write a program for Server-Client socket communication.
    Below is the code snippet:

    try{
    Log.d(LOG_TAG, "OK");
    providerSocket = new ServerSocket(8000, 10);
    connection = providerSocket.accept();

    boolean a = connection.isConnected();

    Toast.makeText(this, "Connection established!",
    Toast.LENGTH_LONG).show();
    return;
    }
    catch(IOException e)
    {
    Log.v(LOG_TAG, "NOK");
    e.printStackTrace();
    }

    When i debug the code, it reaches at connection = providerSocket.accept(); and stops debugger by showing below message
    Source Not found
    The source attachment does not contain the source file ServerSocket.class
    You can change the source attachment by clicking Change Attached Source below:

    When i try to click on button i dont find any source file src.zip in the directory of Android.
    Eclipse does have src.zip but in many folders so i am confused to choose which file to be selected.

    Any other clues??

    Prasad
     



    1. Download the Forums for Android™ app!


      Download

       
Loading...

Share This Page

Loading...