开始学习 android 了,学习的是高明鑫老师的android视频教程(android视频教学)。 学到第八讲时, 在写动态设置时报错:

The method setOnClickListener(View.OnClickListener) in the  type View is not applicable for the arguments (new OnClickListener(){})

解决方法:

增加一个导入

import android.view.View.OnClickListener;

转载于:https://www.cnblogs.com/anyuan9/p/6171631.html

The method setOnClickListener(View.OnClickListener) in the type View is not applicable相关推荐

  1. The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the argu

    eclipse 写 android 自动添加事件,报错 The method setOnClickListener(View.OnClickListener) in the type View is ...

  2. The method setClass(Context, Class?) in the type Intent is not applicable for the arguments (GameV

    在当前短信内容的activity中写            Bundle bun = new Bundle();         bun.putString("message",  ...

  3. The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the argument

    Fragment 的使用过程中总是遇到各种各种奇怪的报错, 例如这样的 错的根本原始吗就是包导入错了,也不算导入错了,就是导入的包匹配 这个不匹配就是你的activity中导入的包和几个fragmen ...

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

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

  5. 导包View.OnClickListener和DialogInterface.OnClickListener冲突的解决方案

    同时有import android.view.View.OnClickListener;(以下简称①包)和importandroid.content.DialogInterface.OnClickLi ...

  6. View.onClickListener和DialogInterface.onClickListener冲突问题

    问题:再用到原生的dialog提示框时,如果当前Activity同时用到View.onClickListener和DialogInterface.onClickListener,一般就会出现问题. 例 ...

  7. 解决Undefined function or method 'vgg_kmiter' for input arguments of type 'double'.

    Undefined function or method 'vgg_kmiter' for input arguments of type 'double'. Error in ==> vgg_ ...

  8. MapReduce操作时Error:The method setInputPaths(JobConf, String) in the type FileInputFormat is not

    问题描述 今天在写java API的MapReduce操作时,出现了Error:The method setInputPaths(JobConf, String) in the type FileIn ...

  9. The method getTextContent() is undefined for the type Node 错误解决办法

    在开发项目中,出现一个错误:The method getTextContent() is undefined for the type Node,解决办法: 网上查大部分是说jdk版本问题,发现不是, ...

最新文章

  1. 5行代码就能入门爬虫?
  2. 最短路径问题 --- Dijkstra算法详解
  3. 5.[BX]和Loop指令
  4. 动态 Restful API 生成
  5. Linux下使用Iptraf进行网络流量的分析
  6. linux拷贝带子文件夹命令,简单带子目录的makefile练习
  7. 深入浅出裸测之道---单元测试的单元化
  8. 阿里云前端周刊 - 第 25 期
  9. 磁盘一把锁一个感叹号_TBase中的一些锁
  10. 计算机辅助初中数学教学,初中数学教学论文 计算机辅助农村初中数学教学的几点想法...
  11. 1040 Longest Symmetric String (25 分)
  12. 十三天学会C语言笔记
  13. 道路覆盖 (二分答案+状压DP)
  14. java jws web_基于Jws的WebService项目
  15. signal信号捕捉
  16. 相似图片搜索的原理(1)
  17. 企业微信与个人微信实现消息互通,用企业微信连接10亿客户
  18. centos7 完美适配QQ,TIM,微信,Foxmail,迅雷,有道云笔记,钉钉,金山词霸,爱奇艺,百度云盘,QQ音乐
  19. ads1258_ADS1258 pdf,ADS1258中文资料,ADS1258应用电路-华秋商城
  20. Android中出现的各种错误

热门文章

  1. 手把手教你发行自己的以太坊ERC20 Token 并进行转账
  2. Android设计模式MVVM之DataBinding简单使用
  3. python重复字符串n次_python装饰器听了N次也没印象,读完这篇你就懂了
  4. Eigen求解数学问题(二)
  5. 2022.2.28集成电子开关电路TWH8778
  6. uvalive5092(找规律)
  7. Codeforces 1246D/1225F Tree Factory (构造)
  8. AtCoder AGC019E Shuffle and Swap (DP、FFT、多项式求逆、多项式快速幂)
  9. java 判断是否整形_java判断是否基本类型
  10. 抽象类可用于创建对象吗_野芝麻,见过吗?可用于肺热咳血、血淋、跌打损伤...