错误消息源附件不包含的文件源ListView.class [英] Error Message-The source attachment does not contain the source for the file ListView.class

查看:213
本文介绍了错误消息源附件不包含的文件源ListView.class的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

新到Android。我得到在调试器的角度来看以下消息:

new to Android. I get the following message in the debugger perspective:

源附件不包含的文件ListView.class源
您可以通过单击更改连接源在

The source attachment does not contain the source for the file ListView.class You can change the source attachment by clicking the change attached Source Below

不用多说了应用程序错误。我试图改变源代码连接到的位置路径:

Needless to say the app errors. I've tried to change the source attachment to the location path:

C:/ Program Files文件/ Android版/ Android的SDK窗口/平台/ Android的-8 /的android.jar

C:/Program Files/Android/android-sdk-windows/platforms/android-8/android.jar

但是,这并不工作。

任何想法将是非常美联社preciated。

Any thoughts would be much appreciated.

code是:

import android.app.ListActivity;
import android.os.Bundle;
import android.view.*;
import android.widget.*;


public class HelloListView extends ListActivity 
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);

      setListAdapter(new ArrayAdapter<String>(this, R.layout.main, COUNTRIES));

      ListView lv = getListView();
      lv.setTextFilterEnabled(true);

     lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
        public void onItemClick(AdapterView<?> parent, View view,
            int position, long id) {
          // When clicked, show a toast with the TextView text
          Toast.makeText(getApplicationContext(), ((TextView) view).getText(),
              Toast.LENGTH_SHORT).show();
        }
      });
    }


    static final String[] COUNTRIES = new String[] {
        "Afghanistan", "Albania", "Algeria", "American Samoa...

谢谢!

推荐答案

源附件不包含的文件源ListView.class

不用多说了应用程序错误。

Needless to say the app errors.

调试器只是在说你的栈帧当前突出显示调试器在ListView类并没有源$ C ​​$ C,能够在编辑器中。的这当然不是你什么问题,你与你的程序有原因。的如果你发现对应源$ C ​​$ C通过StackFrame,调试器会很乐意告诉你的$ C $科目对应的堆栈帧。你可以去安装Android源$ C ​​$ C的麻烦,但它不会解决你与你的程序有什么问题。

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.

请澄清一下你的程序是做错了 - 什么是比其他消息症状。请看看在LogCat中的错误消息,异常和堆栈跟踪,并张贴他们。

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.

这篇关于错误消息源附件不包含的文件源ListView.class的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆