找不到符号类BaseExpandableListAdapter android studio错误

时间:2015-02-26 12:24:39

标签: android android-studio

我是android studio的新手,我正在尝试使用BaseExpandableListAdapter 并且在运行我的项目时会引发错误,说

找不到符号类BaseExpandableListAdapter 这是类函数的额外错误

错误:

Error:(66, 43) error: cannot find symbol class BaseExpandableListAdapter
Error:(92, 3) error: method does not override or implement a method from a supertype
Error:(103, 3) error: method does not override or implement a method from a supertype
Error:(113, 3) error: method does not override or implement a method from a supertype
Error:(244, 3) error: method does not override or implement a method from a supertype
Error:(119, 3) error: method does not override or implement a method from a supertype
Error:(108, 3) error: method does not override or implement a method from a supertype
Error:(249, 3) error: method does not override or implement a method from a supertype
Error:(256, 3) error: method does not override or implement a method from a supertype
Error:(261, 3) error: method does not override or implement a method from a supertype
Error:(297, 3) error: method does not override or implement a method from a supertype
Error:(304, 4) error: cannot find symbol method notifyDataSetChanged()
Error:(313, 3) error: method does not override or implement a method from a supertype

我的android studio版本1.1.0

1 个答案:

答案 0 :(得分:2)

我遇到了同样的问题。

此问题有两种解决方案。 你可以尝试一下。

  • 解决方案1 ​​

使用该类的完全限定名称,而不是仅使用类名。

E.g。改变

class xxx extends BaseAdapter

class xxx extends android.widget.BaseAdapter
  • 解决方案2

删除未使用的'导入'句子。

使用 Ctrl + Alt + O ,快速删除未使用的导入。

可能这是由未使用的导入引起的。 祝你好运。