title: setOnClickListener error Null object
body: <p>I saw many questions like mine<br>
  and I try to fix my codes but failed...<br>
  this is my code:  </p>
  
  <pre><code>public class MainActivity extends ActionBarActivity {
  EditText usernameEditText;
  EditText passwordEditText;
  public Button saveme;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
  
      usernameEditText = (EditText) findViewById(R.id.username);
      passwordEditText = (EditText) findViewById(R.id.pass);
  
      saveme = (Button) findViewById(R.id.loginn);
      saveme.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              try{
                  String givenUsername = usernameEditText.getEditableText().toString();
                  String givenPassword = passwordEditText.getEditableText().toString();
                  // CALL GetText method to make post method call
                  HttpClient httpclient = new DefaultHttpClient();
                  HttpPost httppost = new HttpPost("http://fb.facenegah.com/android/login.php");
                  List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(2);
                  nameValuePairs.add(new BasicNameValuePair("email", givenUsername));
                  nameValuePairs.add(new BasicNameValuePair("pass", givenPassword));
                  httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
                  HttpResponse response = httpclient.execute(httppost);
                  HttpEntity entity = response.getEntity();
                  String responseText = EntityUtils.toString(entity);
                  Toast bread = Toast.makeText(getApplicationContext(), responseText, Toast.LENGTH_LONG);
                  bread.show();
              }
              catch(Exception ex)
              {
                  //   content.setText(" url exeption! " );
              }
          }
      });
  </code></pre>
  
  <p>and this is my xml </p>
  
  <pre><code>&lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceLarge"
      android:text="ایمیل/شناسه کاربری"
      android:id="@+id/textView"
      android:layout_alignParentTop="true"
      android:layout_centerHorizontal="true"
      android:layout_marginTop="30dp" /&gt;
  
  &lt;EditText
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/username"
      android:width="150dp"
      android:layout_alignParentTop="true"
      android:layout_centerHorizontal="true"
      android:layout_marginTop="60dp" /&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceLarge"
      android:text="رمز عبور"
      android:id="@+id/textView2"
      android:layout_below="@+id/username"
      android:layout_centerHorizontal="true"
      android:layout_marginTop="23dp" /&gt;
  
  &lt;EditText
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:inputType="textPassword"
      android:ems="10"
      android:id="@+id/pass"
      android:layout_below="@+id/textView2"
      android:layout_centerHorizontal="true"
      android:layout_marginTop="10dp"
      android:width="150dp" /&gt;
  
  &lt;Button
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="ورود"
      android:id="@+id/loginn"
      android:layout_below="@+id/pass"
      android:layout_centerHorizontal="true"
      android:layout_marginTop="15dp" /&gt;
  </code></pre>
  
  <p>But I get this error:</p>
  
  <pre><code>Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference  
  </code></pre>
  
  <p>What is the issue?</p>