android点滴2:The method...in the type View is not...

The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the arguments (Activity_02Activity.MyButtonListener) java

 

当出现这个错误时是由于倒错包了!查看.java文件的头部可知,导入的是import android.content.DialogInterface.OnClickListener;其实咱们要的包是import android.view.View.OnClickListener;将其view这个包替换content的包便可解决! android

相关文章
相关标签/搜索