android问题1:cannot be resolved to a type

 时间:2026-02-12 22:55:08

1、这个是我写的 OnCheckedChangeListener 方法,能识别但是老是报错,如图:

android问题1:cannot be resolved to a type

2、查看问题提示,老是提示OnCheckedChangeListener cannot be resolved to a type,

android问题1:cannot be resolved to a type

3、可是和这个方法,是checkbox的下属方法,如图:

android问题1:cannot be resolved to a type

4、琢磨了半天,原理这个方法,每次都要导入相应的包,才可以,也就是导入

import android.widget.CompoundButton.OnCheckedChangeListener;如图:

android问题1:cannot be resolved to a type

  • eclipse创建java程序教程
  • Eclipse怎么设置中文
  • 抽象类和接口的区别有哪些
  • python怎么保存
  • 怎么用Python输出hello world
  • 热门搜索
    板栗煲鸡汤的做法 红烧鸡爪的家常做法 不客气英语怎么说 过敏怎么治 铁棍山药的做法大全 虚岁怎么算 怎么关闭朋友圈 糯米糍粑的做法 最正宗可乐鸡翅的做法 萝卜饼的家常做法