The method onClick(View) of type MainActivity must override or implement a supertype method
2016-03-24 23:00
459 查看
在敲《第一行代码》90面的代码的时候,出现两个错误:
刚开始根据错误提示选择第一个:
于是就代码就变成: button.setOnClickListener((OnClickListener) this);
此时第一个错误还是存在,于是选择最后一个提示:
更改后,活动:
到此问题得到解决。
虽然是个小问题,但是在敲代码的时候也要注意细节。
刚开始根据错误提示选择第一个:
于是就代码就变成: button.setOnClickListener((OnClickListener) this);
此时第一个错误还是存在,于是选择最后一个提示:
更改后,活动:
到此问题得到解决。
虽然是个小问题,但是在敲代码的时候也要注意细节。
相关文章推荐
- "The server ... did not accept the certificate." (NSURLErrorDomain:-1205)
- Light oj1138 - Trailing Zeroes (III)
- hdu 1839 Delay Constrained Maximum Capacity Path(最短路+二分)
- Wrong02-Could not find a storyboard named‘Main’in bundle NSBundle
- 给AIX5系统做克隆
- AIX6 rootvg做镜像
- 11.Container With Most Water
- 从AlphaGo谈通用型人工智能设计
- 《leetCode》:Factorial Trailing Zeroes
- 解决“linker command failed with exit code 1(use -v to see invocation)”的问题
- Chai3d中球射线和几何对象的交点
- Could not obtain transaction-synchronized Session for current thread
- linux wait 和waitpid
- http://blog.csdn.net/wxwzy738/article/details/16968767
- UVALive 6555 Playing Fair with Cryptography(细节处理)
- IBATIS的工作原理(1)(http://blog.csdn.net/chen861201/article/details/7614201)
- LeetCode Algorithms #24 <Swap Nodes in Pairs>
- 动态分析maillog日志,把恶意链接直接用防火墙禁止
- 史上最详细的centos下 postfix + extmail + dovecot + maildrop 安装笔记
- LeetCode 336 Palindrome Pairs(回文串)