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关键字来实现 ...
随机推荐
- FlashBuilder精选插件
1.Easy Explorer:打开在eclipse中选定文件所在的目录.这是一个非常不错的插件,有了它,你就可以随时跳到你指定文件的目录了.地址:http://sourceforge.net/pro ...
- 配置Windows Live Writer,写cnblogs博客
引言 以前写博客一般都是联网在cnblogs上面写,不好的地方就是不联网就写不了,当然我们也可以先记录在word文件,等联网在从word里面拷贝出来发布到cnblogs上面,但是样式这些 ...
- 哈夫曼(Huffman)编码
哈夫曼编码(Huffman Coding)是一种非常经典的编码方式,属于可变字长编码(VLC)的一种,通过构造带权路径长度最小的最优二叉树以达到数据压缩的目的.哈弗曼编码实现起来也非常简单,在实际的笔 ...
- 将 Discuz X3 手机版默认的“标准版”改为“触屏版”
修改前请备份原文件 1.找到“\source\class\discuz\discuz_application.php”,将其中的 'mobiletpl' => array('1' =&g ...
- arcgis mdb和gdb编辑区别
arcgis gdb保存时错误会提供行包含错误值:[DJH3],mdb不会,只会提示字段值太小
- python(4)–yield实现异步
首先我们假设一个情景:一个人做包子,一次只能做一个:来了两个吃包子的,做包子做好了包子依次分给两个吃包子的. 先上代码: import time ''' 一个做包子吃包子模型,一个做包子的,两个吃包子 ...
- “Request Entity Too Large” 上传图片出现大小限制
昨天公司安卓app上传了图片爆了下面这个错误 <"-//IETF//DTD HTML 2.0//EN"> <html><head> <ti ...
- CF A and B and Compilation Errors (排序)
A and B and Compilation Errors time limit per test 2 seconds memory limit per test 256 megabytes inp ...
- LeetCode 338
Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the ...
- 快速启动软件之 Rolan ,你真的会用?
2015.2.14 很高兴 Rolan 这个软件至今还在更新,并且愈发完善,UI 的设计和功能上的改进都给了我不小的震撼. 如今的 Rolan ,可以对比一下 2014 年的图,变化真的很大有木有: ...