Android: nullpointerexception when enabling the button
<p>I am trying to enable a button when check box is checked , but iam getting <code>nullpointerexception</code></p>

<pre><code>viewHolder.checkBox.setChecked(Constants.checkBoxState[position]);


        final Button savebtn1 = (Button) view.findViewById(R.id.savebtn);
        viewHolder.checkBox.setOnClickListener(new View.OnClickListener() {

            public void onClick(View v) {
                if (((CheckBox) v).isChecked()) {
                    // Toast.makeText(activity, "checked" , Toast.LENGTH_SHORT).show();
                    Constants.checkBoxState[position] = true;
                    Constants.selectedContacts.add(listCont.get(position));
                    savebtn1.setEnabled(true);
                } else {

                    Constants.checkBoxState[position] = false;
                    Constants.selectedContacts.remove(listCont.get(position));

                }

            }
        });
</code></pre>

<p>Any idea?       </p>
