Android Login Broken
<p>I need help with making a login for my android app but when i put in the user it comes out with java.lang.NullPointerExption and its from the bottom part heres the ending code</p>

<pre><code> public void onClick(View v) {

        ArrayList&lt;NameValuePair&gt; postParameters = new ArrayList&lt;NameValuePair&gt;();

        postParameters.add(new BasicNameValuePair("username", un.getText().toString()));

        postParameters.add(new BasicNameValuePair("password", pw.getText().toString()));

        //   String valid = "1";      

        String response = null;

        try {

           response =     CustomHttpClient.executeHttpPost("http://www.edgeblok.com/check.php", postParameters);

           String res = response.toString();

           //res = res.trim();

           res = res.replaceAll("\\s+","");

           // error.setText(res);

           if (res.equals("1")) error.setText("Correct Username or Password");

           else error.setText("Sorry!! Wrong Username or Password Entered");

        } 

        catch (Exception e) {

           error.setText(e.toString());

        }

     }


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

<p>}</p>
