qbush
qbush

Reputation: 720

'ExpandableListAdapter' is abstract; cannot be instantiated

I was working on the tutorial at http://javapapers.com/android/android-expandable-listview/.

I was working on the MainActivity.java section, and I got this error:

'ExpandableListAdapter' is abstract; cannot be instantiated

How can I fix this?

Upvotes: 2

Views: 4093

Answers (2)

Sameer Awate
Sameer Awate

Reputation: 99

I know it's a little old question but this answer might help to those facing similar issue. Essentially, you are getting that error as ExpandableListAdapter is an abstract class. To get rid of it implement your own Adapter. You might refer to following post to understand how it can be done - http://www.androidhive.info/2013/07/android-expandable-list-view-tutorial/. Hope this helps. Thanks.

Upvotes: 1

IntelliJ Amiya
IntelliJ Amiya

Reputation: 75788

Rename the Adapter ExpandableListAdapter's this will solve your problem.

Upvotes: 5

Related Questions