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关键字来实现 ...
随机推荐
- android 动态改变屏幕方向
LANDSCAPE与PORTRAIT 范例说明 要如何通过程序控制Activity的显示方向?在Android中,若要通过程序改变屏幕显示的方向,必须要覆盖 setRequestedOrientati ...
- java_数组作缓存池的不可变类实例
package ming; public class CacheImmutale { private static int MAX_SIZE = 10; private static CacheImm ...
- df 和 du 命令详解
df命令详细用法 a:显示全部的档案系统和各分割区的磁盘使用情形 i:显示i -nodes的使用量 k:大小用k来表示 (默认值) t:显示某一个档案系统的所有分割区磁盘使用量 x:显示不是某一个档案 ...
- 1002 GTY's birthday gift
GTY's birthday gift Time Limit ...
- android网络请求之POST方法
package com.jredu.helloworld.activity; import android.os.Bundle; import android.os.Handler; import a ...
- spring mvc 使用Optional
return Optional.ofNullable(brokerRepository.findOne(id)) .map(broker -> new ResponseEntity<> ...
- redis中5种数据结构的使用
一.redis 数据结构使用场景 原来看过 redisbook 这本书,对 redis 的基本功能都已经熟悉了,从上周开始看 redis 的源码.目前目标是吃透 redis 的数据结构.我们都知道,在 ...
- mysql 修改 character_set_database 编码格式
操作系统:win10 x64 Server version : 5.5.46 MySQL Community Server (GPL) mysql 修改 character_set_database ...
- vb中的null.nothing.empty区别
以下内容源自互联网: 变量 A.B.C.D 分别等于 0."".Null. Empty. Nothing 的哪一个? Dim A Dim B As String Dim C As ...
- 封装SqliteHelper类--Sqlite数据库
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threa ...