Error Message-the Source Attachment Does Not Contain The Source For The File Listview.class
Solution 1:
The source attachment does not contain the source for the file ListView.class
Needless to say the app errors.
The debugger is simply saying your stack frame currently highlight in the debugger is in the ListView class and you don't have the source code to be able it in the editor. This certainly is not the cause of your whatever problem you're having with your program. If you find the stackframe that corresponds to your source code, the debugger will happily show you the code corresponding to the stack frame. You could go to the trouble of installing the Android source code, but it won't solve whatever problem you're having with your program.
Please clarify what your program is doing wrong - what are the symptoms other than that message. Please look in LogCat for error messages, exceptions, and stack traces and post them.
Solution 2:
If you had the source it would only allow you to step into the source for the operating system classes themselves, which would probably confuse you. To see what your cause is when it stops in the debugger, keep hitting F6 until the variables in the debug perspective show you the exception. It will be something like:
this InvocationTargetException (id=????????) exception IllegalStateException (id=????????) cause ClassCastException (id=????????) detailMessage "ArrayAdapter requires the resource ID to be a TextView" (id=????????)
because I've done this tutorial in the past and know that the line:
setListAdapter(newArrayAdapter<String>(this, R.layout.main, COUNTRIES));
should be
setListAdapter(newArrayAdapter<String>(this, R.layout.list_item, COUNTRIES));
That's the cause
Solution 3:
This error message is shown when the source path is not properly set. If it is Eclipse, then click change attach source button which is shown below the error message, and give the source path (Eg. C:/Program Files/Java/jdk1.6.0_24/src.zip).
Or
Go to Project > Properties > Java Build Path > Libraries Expand JRE System Library. Expand rt.jar. Select Source attachment and double click or Edit. Type path the source code file (External File…) and press OK.
Reference : http://android.okhelp.cz/class-file-editor-source-not-found-change-attached-source-eclipse/
Post a Comment for "Error Message-the Source Attachment Does Not Contain The Source For The File Listview.class"