依照视屏编写代码如下

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)问题的更多相关文章

  1. must implement the inherited abstract method

    The type VideoView must implement the inherited abstract method MediaController.MediaPlayerControl.g ...

  2. The type new View.OnClickListener(){} must implement the inherited abstract method View.Onclicklis

    public class MainActivity extends Activity { protected Button startBrew = null; @Override protected ...

  3. android-xxxx must implement the inherited abstract method报错

    public class ContactMainFragment extends Fragment implements OnClickListener { 提示:ContactMainFragmen ...

  4. JAVA-错误The type BookServiceImpl must implement the inherited abstract method

    错误原因 :是因为class继承了其他的类,没有导入过来,选择add unimplemented methods进行解决

  5. 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 ...

  6. The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder i

    参考资料: http://blog.csdn.net/competerh_programing/article/details/7377950 在创建Dialog的时候,出现: The method ...

  7. Android中View类OnClickListener和DialogInterface类OnClickListener冲突解决办法

    Android中View类OnClickListener和DialogInterface类OnClickListener冲突解决办法 如下面所示,同时导入这两个,会提示其中一个与另一个产生冲突. 1i ...

  8. new DialogInterface.OnClickListener()报错的解决办法

    在项目过程中 new DialogInterface.OnClickListener()总是报下面的错 Illegal qualified access from the type parameter ...

  9. 抽象方法(abstract method) 和 虚方法 (virtual method), 重载(overload) 和 重写(override)的区别于联系

    1. 抽象方法 (abstract method) 在抽象类中,可以存在没有实现的方法,只是该方法必须声明为abstract抽象方法. 在继承此抽象类的类中,通过给方法加上override关键字来实现 ...

随机推荐

  1. NDK环境配置

    1.下载安装插件:com.android.ide.eclipse.ndk_23.0.2.1259578.jar      copy到E:\eclipse\adt-bundle-windows-x86- ...

  2. Linux守护进程(init.d和xinetd)

    http://www.cnblogs.com/itech/archive/2010/12/27/1914846.html

  3. maven插件开发(二)

    因为很多jar都是在开发环境中,没有到仓库中,因此偷个懒,用命令直接自动安装到仓库去.在开发的过程中遇到一个比较诡异的问题,插件用命令调mvn 安装jar到仓库总是抛如下异常: maven Canno ...

  4. NonEmpty和Non Empty的区别[转]

    One of my favourite questions in MDX is the difference between Non Empty and NonEmpty because even t ...

  5. 怎样用通用pe工具箱制作U盘启动盘

    U盘启动盘制作过程,随着网络的普及,电脑已经成为我们日常生活中的重要一环,最近自己重装了下电脑系统,无意中发现一个傻瓜式的U盘装系统方法,就把怎么制作通用pe工具箱u盘启动盘的经验拿出来跟大家分享下. ...

  6. Clustering by density peaks and distance

    这次介绍的是Alex和Alessandro于2014年发表在的Science上的一篇关于聚类的文章[13],该文章的基本思想很简单,但是其聚类效果却兼具了谱聚类(Spectral Clustering ...

  7. oracle时间格式转换问题 ORA-01810: format code appears twice--转

    今天在做报表查询的时候Oracle报错: 信息为 ORA-01810: format code appears twice 原因:由于想java一样转化时间格式,但是Oracle中是不区分大小写的,所 ...

  8. 我cnblogs的主题

    我的cnblogs主题 这里记录的是本博客的主题存档 主题代码参考自:流云诸葛的博客 博客皮肤选择 选择 LessIsMore 页面定制CSS代码 div.post div.entry { font- ...

  9. ubuntu14_pip 安装

    1:install pip python-dev    sudo apt-get install python-dev    sudo apt-get install libevent-dev     ...

  10. RedHat7搭建yum源服务器

    1.新建目录 # mkdir -p /content/rhel7/x86_64/{isos,dvd}/ 2.上传RedHat安装光盘镜像,上传后的路径为 /content/rhel7/x86_64/i ...