Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to insert data of arrayList in ListView

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I am trying to insert data of a Array List into ListView but it is showing problem.
Here is my xml file


and this is my Source file



But when i click on Insert Button on my activity it stops

Where am I going wrong?

Thanks
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If an application crashes, the first thing you should always do is to read the logcat where the exception stack trace is recorded. That will tell you what kind of exception happened, and in which line of code.

In this case I bet it's a NullPointerException because you're calling a method on a null object reference.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic