onClickListener cannot be resolved to a type and not applicable

前端 未结 5 2020

New to Java, using Eclipse. Except this error I also got some:

Description Resource Path Location Type The method onClick(View) of type new onClickListener

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-22 09:00

    In the button2.setOnClickListener method change

    new onClickListener()
    

    to

    new OnClickListener()
    

提交回复
热议问题