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
  • 热门搜索
    县级市和县有什么区别 忙内是什么意思 ps是什么材料 single是什么意思 伟大的反义词是什么 txt是什么意思 .bak是什么文件 1988年是什么命 痴汉是什么意思 八月八日是什么日子