The method setOnClickListener(View.OnClickListener)解决办法
来源:互联网 发布:捕鱼游戏网页版源码 编辑:程序博客网 时间:2024/06/03 14:52
文章系转载,点此查看出处
The method setOnClickListener(View.OnClickListener) in the type View is not
开始学习 android 了 学习的是 马老师的 android视频教程(android视频教学) 学到第一季 第六集时 在写监听器时总是不过,极端及郁闷。遇到的问题有一两个 第一 没看清楚马老师 那个快捷键 (其实就是 alt+/)
第二 用 alt+/ 快捷键添加之后是
@Override public void onClick(DialogInterface arg0, int arg1) { // TODO Auto-generated method stub
而不是视频中的 @Override public void onClick(View v) { // TODO Auto-generated method stub
第三 不管怎么修改都无法通过。
最后我找到了解决办法,正在这里跟大家分享一下
有两点需要修改
1.把 @Override public void onClick(DialogInterface arg0, int arg1) { // TODO Auto-generated method stub 改成
@Override public void onClick(View v) { // TODO Auto-generated method stub
2. 把 import android.content.DialogInterface.OnClickListener; 改成 import android.view.View.OnClickListener;
(就是导入的文件)
0 0
- android The method setOnClickListener(View.OnClickListener)解决办法
- The method setOnClickListener(View.OnClickListener)解决办法
- The method setOnClickListener(View.OnClickListener)解决办法
- The method setOnClickListener(View.OnClickListener) in the type---错误
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the argum
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the argum
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the argum
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the argum
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the argum
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the argum
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the argu
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the argum
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable
- android开发The method setOnClickListener(View.OnClickListener) in the type View is not错误
- android The method setOnClickListener(View.OnClickListener) in the type View is not applicable for
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable
- 解决-The method setOnClickListener(View.OnClickListener) in the type View is not 错误
- The method setOnClickListener(View.OnClickListener) in the type View is not
- android学习笔记3-文件下载
- 【学习笔记】编译原理-有限自动机
- Windows 程序结构
- Debugging Memory Errors in C/C++
- C++课程设计
- The method setOnClickListener(View.OnClickListener)解决办法
- Array.prototype.slice.call(arguments)
- bzoj3524[Poi2014]Couriers
- 关于使用TF-IDF模型来推荐歌曲给微博用户的收获
- 利用Jbox2D物理引擎实现愤怒的小鸟
- matlab中 meshgrid 函数的用法
- 我的博客开通了
- Why C++?王者归来
- 我的博客开通了