title: Why does button.setOnClickListener crash my app?
body: <p>I have a view that I'm loading, and my onCreate() method looks like this:</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
  
         volume_id=getIntent().getStringExtra("volume_id");
         language=getIntent().getStringExtra("language");
         chapter=Integer.parseInt(getIntent().getStringExtra("chapter"));
         book=getIntent().getStringExtra("book");
         book_id=getIntent().getStringExtra("book_id");
  
         final Button back=(Button)findViewById(R.id.backButton);
          back.setOnClickListener(new View.OnClickListener() {
          @Override
  
          public void onClick(View v) {
  
  
              //Toast.makeText(Verse.this, "Back", Toast.LENGTH_LONG).show();
  
          }});
  
       final Button next=(Button)findViewById(R.id.forwardButton);
          next.setOnClickListener(new View.OnClickListener() {
          @Override
  
          public void onClick(View v) {
  
  
              //Toast.makeText(Verse.this, "Next", Toast.LENGTH_LONG).show();
  
          }});
       }
  </code></pre>
  
  <p>For some reason, the addition of those last several lines of code, that link up to two buttons I've made in the layout file, are making my app crash. I am not getting anything in the error log, so I have absolutely no idea what is going on. </p>
  
  <p>It may be good to note that without that button adding code in my view, the view loads fine, and the buttons show up where they are supposed to.</p>
  
  <p>Does the way I'm adding those buttons look alright? Am I doing something wrong? I wish it wasn't so hard to hook up a GUI button to code...</p>
  
  <p>Thanks</p>