关于android创建对话框报错The method setPositiveButton(int, DialogInterface.OnClickListener) in the type Alert

来源:互联网 发布:女生做软件测试 编辑:程序博客网 时间:2024/05/16 11:41

http://blog.csdn.net/xiaoyuan511/article/details/17114761

关于android创建对话框报错The method setPositiveButton(int, DialogInterface.OnClickListener) in the type Alert

原创 2013年12月04日 10:43:35

The 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()
只要这样写,就不报错了!本人水平有限,也不知道什么原因,希望对你能有帮助!

阅读全文
0 0
原创粉丝点击