must implement the inherited abstract method DialogInterface.OnClickListener.onClick(DialogInterface, int)问题
依照视屏编写代码如下
class MyButtonListener implements OnClickListener{
@Override
public void onClick(View v){
;
}
}
提示MyButtonListener有问题
提示详情The type ActivityA.MyButtonListener must implement the inherited abstract method DialogInterface.OnClickListener.onClick(DialogInterface, int)
onClick问题提示如下
The method onClick(View) of type ActivityA.MyButtonListener must override or implement a supertype method
发现快速修改提示中提示增加abstract修饰词,估计在现在编译器版本中吧OnClickListener改为abstract类,于是修改如下
abstract class MyButtonListener implements OnClickListener{
public void onClick(View v){
;
}
}
修改后问题提示消失,后期再观察是否有影响
///////////////////////////////////////////////////////////////////
实现这个类后,根据提示,修改如下
abstract class MyButtonListener implements android.view.View.OnClickListener
must implement the inherited abstract method DialogInterface.OnClickListener.onClick(DialogInterface, int)问题的更多相关文章
- must implement the inherited abstract method
The type VideoView must implement the inherited abstract method MediaController.MediaPlayerControl.g ...
- The type new View.OnClickListener(){} must implement the inherited abstract method View.Onclicklis
public class MainActivity extends Activity { protected Button startBrew = null; @Override protected ...
- android-xxxx must implement the inherited abstract method报错
public class ContactMainFragment extends Fragment implements OnClickListener { 提示:ContactMainFragmen ...
- JAVA-错误The type BookServiceImpl must implement the inherited abstract method
错误原因 :是因为class继承了其他的类,没有导入过来,选择add unimplemented methods进行解决
- The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder is not applicable for the arguments
The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder i ...
- The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder i
参考资料: http://blog.csdn.net/competerh_programing/article/details/7377950 在创建Dialog的时候,出现: The method ...
- Android中View类OnClickListener和DialogInterface类OnClickListener冲突解决办法
Android中View类OnClickListener和DialogInterface类OnClickListener冲突解决办法 如下面所示,同时导入这两个,会提示其中一个与另一个产生冲突. 1i ...
- new DialogInterface.OnClickListener()报错的解决办法
在项目过程中 new DialogInterface.OnClickListener()总是报下面的错 Illegal qualified access from the type parameter ...
- 抽象方法(abstract method) 和 虚方法 (virtual method), 重载(overload) 和 重写(override)的区别于联系
1. 抽象方法 (abstract method) 在抽象类中,可以存在没有实现的方法,只是该方法必须声明为abstract抽象方法. 在继承此抽象类的类中,通过给方法加上override关键字来实现 ...
随机推荐
- Linux下的简单好用的计算器bc
1. 关于bc bc是随意精度计算器语言,通常在linux下当计算器用,简单好用.相当于windows下的计算器. 2. 支持的运算符 主要的数学运算: + 加法 - 减法 * 乘法 / 除法 ^ 指 ...
- MYSQL 5.7 新增150多个新功能
http://www.thecompletelistoffeatures.com/ There are over 150 new features in MySQL 5.7. The MySQL ma ...
- LINUX 运维命令
查看3306端口被什么程序占用 [root@DB13 ~]# lsof -i : COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME mysqld mysql ...
- 《Linux内核设计与实现》读书笔记
http://www.cnblogs.com/wang_yb/tag/linux-kernel/
- Linux shell 脚本攻略之文件查找与文件列表
摘自:<Linux shell 脚本攻略>
- jquery ajax 后台和前台数据交互 C#
<input type="button" id="updateInfo" value="更改货载重量" /> <div i ...
- Objective-C ,ios,iphone开发基础:使用GDataXML解析XML文档,(libxml/tree.h not found 错误解决方案)
使用GDataXML解析XML文档 在IOS平台上进行XML文档的解析有很多种方法,在SDK里面有自带的解析方法,但是大多情况下都倾向于用第三方的库,原因是解析效率更高.使用上更方便 这里主要介绍一下 ...
- 【VMware虚拟化解决方案】设计和配置VMware vCenter 5.5
在这之前,我们已经对VMware ESXi 5.5进行了整个环境的设计和规划,虽然安装VMware ESXi 5.5在CPU的选型.网络的设计.共享存储的方式.虚拟化资源的需求和安装ESXI的模式等一 ...
- oracle中的sql%rowcount
sql%rowcount用于记录修改的条数,就如你在sqlplus下执行delete from之后提示已删除xx行一样,这个参数必须要在一个修改语句和commit之间放置,否则你就得不到正确的修改行数 ...
- 将CSV格式的文件导入到数据中
--创建表 create table t1( id number primary key, name ), score number, subject ) ) --创建控制文件 t1.ctl,以文本的 ...