PDA

View Full Version : Debugging my first app: "No source found"



ppmoore
03-30-2009, 10:27 AM
Hello,

Here is my application code fragment (developed on a Win32 platform):



@Override
public void onCreate(Bundle savedInstanceState)
{
I super.onCreate(savedInstanceState);
setContentView(R.layout.main);

// Count number of lines in dictionary file
String dictName = "dictionary.txt";
String dirName = "H:\\Test";
B File dictPath = new File( dirName, dictName);


I set the breakpoint to the line indicated "B", and then start the debugger. The debugger perspective is displayed and it indicates that the current instruction pointer is pointing to the line indicated "I". I press F8 to resume the program, and a second window appears with "Souce not found", and "Enter source lookup path". I checked that the path correctly points to where my java source code is located.

Searching here, it seems to imply that the Android source code is not available. Why would I need source code in this case?

I repeated the test, and this time single stepped from the first line indicated "I". This time, the message appeared after the second line with setContentView().

I repeated the test on Linux, and I get identical behaviour.

Can anyone help?

Thanks,
Paul

mye2096
03-30-2009, 12:43 PM
I assume you are using elipse? when you set up elipse did you set your android sdk path correctly? I think it's complaining that it can't find your sdk, not the android kernel source. Make sure you followed all the steps setting up your sdk.

ppmoore
03-30-2009, 01:22 PM
Thanks, you're right, I found it also.

Paul

ickyfehmleh
03-30-2009, 03:23 PM
Also note that the "H" drive does not exist in Android (or any Unix, for that matter).