关于android创建对话框报错The method setPositiveButton(int, DialogInterface.OnClickListener) in the type Alert
16lz
2021-12-04
http://blog.csdn.net/xiaoyuan511/article/details/17114761
关于android创建对话框报错The method setPositiveButton(int, DialogInterface.OnClickListener) in the type Alert
原创 2013年12月04日 10:43:35The method setPositiveButton(int, DialogInterface.OnClickListener) in the type AlertDialog.Builder is not applicable for the arguments (String, new View.OnClickListener(){})
Here is your solution, you did a silly mistake there buddy.
It should not be
.setNegativeButton("Don't Remind", new OnClickListener()
It should be
.setNegativeButton("Don't Remind", new DialogInterface.OnClickListener()
只要这样写,就不报错了!本人水平有限,也不知道什么原因,希望对你能有帮助!
更多相关文章
- android原生项目整合ReactNative
- AndroidVirtual Devices (AVD)创建、设置
- Android之十一实现登陆页面分析
- 创建 cocos2d-x+lua for android 步骤
- Android(安卓)布局中 如何使控件居中
- Android中RelativeLayout的字符水平(垂直居中)对齐
- LinearLayout水平居中控制
- Android(安卓)4高级编程(第3版)》
- Android(安卓)Dialog的使用