-2

The error is in Image.cLick here for Screenshot

How I can solve this error help?

Federico Navarrete
  • 3,069
  • 5
  • 41
  • 76
  • 1
    Does this answer your question? [What is a NullPointerException, and how do I fix it?](https://stackoverflow.com/questions/218384/what-is-a-nullpointerexception-and-how-do-i-fix-it) – kg99 Dec 17 '20 at 07:32

2 Answers2

-1

seems like btnDish is null. Are you assigning it a value somewhere in code above?

You should be doing something like


btnDish = findViewById(R.id.btnDish)
btnDish.setOnClickListner { 
   //do stuff here
}
georkost
  • 588
  • 6
  • 12
-1
  Button button = (Button) findViewById(R.id.button_send);
  button.setOnClickListener(new View.OnClickListener() {
  
  public void onClick(View v) {
      Intent intent = new Intent(FirstActivity.this,SecondActivity.class);
      startActivity(intent);
     }
  });
Aditya Kamath
  • 2,217
  • 2
  • 17
  • 19
developer
  • 30
  • 6