onClickListener cannot be resolved to a type and not applicable

前端 未结 5 2021

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 08:52

    change your button click listener to this

    button1.setOnClickListener(new View.onClickListener() {}

    button2.setOnClickListener(new View.onClickListener() {}

提交回复
热议问题