导读:The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the arguments (Activity_02Activity.MyButtonListener)当出现这个错误时是因为倒错包了!查看.jav......
The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the arguments (Activity_02Activity.MyButtonListener)
当出现这个错误时是因为倒错包了!查看.java文件的头部可知,导入的是 import android.content.DialogInterface.OnClickListener;其实我们要的包是import android.view.View.OnClickListener;将其view这个包替换content的包即可解决!