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
  • 热门搜索
    yp是什么意思 pen是什么意思 什么是物业 giao是什么意思 净水器什么牌子好 ul是什么单位 哥德巴赫猜想是什么 puk码是什么 笑什么如花笑靥如花 lower是什么意思