This week's book giveaway is in the iOS forum.
We're giving away four copies of Classic Computer Science Problems in Swift and have David Kopec on-line!
See this thread for details.
Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

error : Your content must have a ListView  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

Why am I getting this message?

06-20 18:47:11.839: E/AndroidRuntime(1065): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.test/com.example.test.MainActivity}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'




MainActivity.java :


activity_main.xml :



row.xml :
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when you are using ListActivity by extending the ListActivity class you should not use the setContentView() method.

Try commenting out the setContentView() method. It will work fine... enjoy...!!!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!