java - ExpandAbleListView 出现 Cannot instantiate the type ExpandableListAdapter 错误

标签 java android android-adapter

代码中以及 new 之后的第二行有错误。 在 expandablelistAdapter 的构造函数上。请帮帮我。

错误是:无法实例化类型 ExpandableListAdapter ....

mExpandableListView = (ExpandableListView) findViewById(R.id.list);     
adapter = new ExpandableListAdapter(this,mExpandableListView,mGroupCollection); 
mExpandableListView.setAdapter(adapter);

最佳答案

更改适配器 ExpandableListAdapter 的名称,这将解决您的问题。还要使用新名称更改构造函数。

关于java - ExpandAbleListView 出现 Cannot instantiate the type ExpandableListAdapter 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16289786/

相关文章:

java - 在Android中只创建一个类的一个实例

android - Android 浏览器上的 HTML5 输入

android - 在 RecyclerView 适配器中设置自定义字体

java - 如何使用过滤的 RecyclerView 和 OnClickListener 从 ArrayList 中删除项目

java - 为什么 IJavaProject.findPackageFragmentRoots 返回一个空数组?

java - 使用 while 循环和扫描器验证输入

android - 当设备将 "do not keep activities"设置为 ON 时如何处理?

android - 如何在获取数据后使用 ArrayAdapter 重置 ListView

java - 从 src 复制到 Eclipse IDE 中的目标时,Excel 文件损坏

java - 使用 jxl api 将图像插入 Excel 单元格