Listview.setadapter raising nullpointer exception

前端 未结 4 1846
悲&欢浪女
悲&欢浪女 2021-01-23 06:09

The code is as below

    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Intent i = getIntent();

        ArrayLis         


        
4条回答
  •  暖寄归人
    2021-01-23 06:39

    when getting error like this first need to ensure that have given correct xml file as

    setContentView(R.layout.main) and

    listview id (i.e) findViewById(R.id.listview1);

提交回复
热议问题