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关键字来实现 ...
随机推荐
- Oracle DB 通过 Oracle Enterprise Manager注册要使用的恢复目录
通过 Oracle Enterprise Manager 注册要使用的恢复目录. a) 在 EM 中,导航到“Availability > Recovery Catalog Setting ...
- C++之EOF()
fstream流的eof()推断有点不合常理 按常理逻辑来说,假设到了文件末尾的话,eof()应该返回真,可是,C++输入输出流怎样知道是否到末尾了呢? 原来依据的是:假设fin>>不能再 ...
- focusky 购买指南
升级Focusky动画演示大师 所有版本一次购买,终身使用,无限制作,免费升级.支付方式:支付宝.淘宝.银行转账.支付宝付款:点击表格中的“立即购买“进入购买页面->选择版本.数量,并填写详细的 ...
- Expectation Maximization and GMM
Jensen不等式 Jensen不等式给出了积分的凸函数值必定大于凸函数(convex)的积分值的定理.在凸函数曲线上的任意两点间连接一条线段,那么线段会位于曲线之上,这就是将Jensen不等式应用到 ...
- python(5)–random模块及验证码
1. random.random() 随机小数 >>> random.random() 0.6633889413427193 2. random.randint(1,9) ...
- spl_autoload_register()和__autoload()区别
这篇文章主要介绍了spl_autoload_register()和__autoload()区别,需要的朋友可以参考下 关于spl_autoload_register()和__autoload(), ...
- linux别名
alias: alias cdn ='cd /opt/lammp' [root@besttest /]# cdn[root@besttest lampp]# 如果想永久生效写进root/.bash ...
- javaweb学习总结十(xml解析<SAX以及DOM方式>)
一:XML解析技术 一般我们使用sun公司或者开源组织开发的工具包解析xml效率比较高. 1:jaxp解析xml,jaxp是sun公司开发的解析xml工具包 2:jaxp解析xml代码如下 a:获取d ...
- 设计包含min函数的栈
stack<pair<int, int>> sta; void push(int x) { int min_i; if(sta.empty()) { min_i = x; } ...
- 关于VMware桥接的注意事项
VMware 使用桥接 想固定住虚拟机的IP的同时还可以访问外网. 通过Linux的可视化操作界面固定设置IP,网关,子网掩码等配置信息,如下图: 附录本地Windows中的IP地址信息: 虚拟机和 ...