title: .setOnClickListener(this); Causing app crash
body: <p>Currently working on a tic tac toe game for android. I am using a GameView and I am running into the issue of every time I run my app it crashes due to .setOnClickListener(this); If anyone has any helpful tips, that would be great.
  P.s. The button A1 has been placed on the layout.</p>
  
  <pre><code>public class GameView extends View implements View.OnClickListener {
  
      private Paint bluePaint, redPaint;
      private Bitmap a1Tile, a2Tile, a3Tile, b1Tile, b2Tile, b3Tile, c1Tile, c2Tile, c3Tile;
      boolean playerTurn = true;
      int playerTurnCount = 0;
      private Button A1;
      Button[] btnGridArray;
  
      public GameView(Context context) {
          super(context);
          bluePaint = new Paint();
          redPaint = new Paint();
          bluePaint.setColor(Color.BLUE);
          redPaint.setColor(Color.RED);
  
          a1Tile = BitmapFactory.decodeResource(getResources(),R.drawable.a1tile);
          a2Tile = BitmapFactory.decodeResource(getResources(),R.drawable.a2tile);
          a3Tile = BitmapFactory.decodeResource(getResources(),R.drawable.a3tile);
  
          b1Tile = BitmapFactory.decodeResource(getResources(),R.drawable.b1tile);
          b2Tile = BitmapFactory.decodeResource(getResources(),R.drawable.b2tile);
          b3Tile = BitmapFactory.decodeResource(getResources(),R.drawable.b3tile);
  
          c1Tile = BitmapFactory.decodeResource(getResources(),R.drawable.c1tile);
          c2Tile = BitmapFactory.decodeResource(getResources(),R.drawable.c2tile);
          c3Tile = BitmapFactory.decodeResource(getResources(),R.drawable.c3tile);
  
          A1 = (Button)findViewById(R.id.a1Btn);
  
          btnGridArray = new Button[]{A1};
  
          for(Button btn : btnGridArray){
              btn.setOnClickListener(this);
          }
      }
  
      @Override
      protected void onDraw(Canvas canvas) {
          //canvas.drawRect(100,100,100, 80, bluePaint);
          canvas.drawBitmap(a1Tile, 60, 80, null);
          canvas.drawBitmap(a2Tile, 280, 80, null);
          canvas.drawBitmap(a3Tile, 500, 80, null);
          canvas.drawBitmap(b1Tile, 60, 280, null);
          canvas.drawBitmap(b2Tile, 280, 280, null);
          canvas.drawBitmap(b3Tile, 500, 280, null);
          canvas.drawBitmap(c1Tile, 60, 480, null);
          canvas.drawBitmap(c2Tile, 280, 480, null);
          canvas.drawBitmap(c3Tile, 500, 480, null);
          redPaint.setTextSize(72);
      }
  
      @Override
      public void onClick(View v){
          Button btn = (Button) v;
          btnClicked(btn);
      }
  
      public void btnClicked(Button btn){
          if(playerTurn){
              btn.setText("X");
              btn.setTextSize(25);
          }else{
              btn.setText("O");
              btn.setTextSize(25);
          }
          playerTurn = !playerTurn;
      }
  }
  </code></pre>