Your content must have a ListView whose id attribute is 'android.R.id.list'

后端 未结 7 1371
清歌不尽
清歌不尽 2020-11-22 04:07

I have created an xml file like this:




        
7条回答
  •  名媛妹妹
    2020-11-22 04:55

    Inherit Activity Class instead of ListActivity you can resolve this problem.

    public class ExampleActivity extends Activity  {
    
        @Override
        public void onCreate(Bundle savedInstanceState) {
    
            super.onCreate(savedInstanceState);
    
            setContentView(R.layout.mainlist);
        }
    }
    

提交回复
热议问题