android emulator keeps forceing close in the emulator and no errors shown up
<p>main activitythis code  has a log-in screen and data entry screen it was working  but<br>
    wont work now and wont give any errors i fixed this before but can remember </p>

<pre><code>package com.Trish.diabetesapp;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import android.R;
public class MainActivity extends Activity {

EditText txtUserName;
EditText txtPassword;
Button btnLogin;
Button btnCancel;

        @Override
        protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        txtUserName=(EditText)this.findViewById(R.id.txtUname);
        txtPassword=(EditText)this.findViewById(R.id.txtPwd);
        btnLogin=(Button)this.findViewById(R.id.btnLogin);
        btnLogin=(Button)this.findViewById(R.id.btnLogin);
        btnLogin.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
           // TODO Auto-generated method stub
        Intent myIntent = null;
       if((txtUserName.getText().toString()).equals("dom") &amp;&amp; (txtPassword.getText().toString().equals("trisha"))){
              //Toast.makeText(Login.this, "Login Successful",Toast.LENGTH_LONG).show();

              myIntent = new Intent(v.getContext(), Login.class);


        }else{
              Toast.makeText(MainActivity.this, "Invalid Login",Toast.LENGTH_LONG).show();
        }
       startActivity(myIntent);
      }
        });
}

//@Override
//public boolean (Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
//  getMenuInflater().inflate(R.menu.login, menu);
//  return true;
//} 
}
</code></pre>

<p>here is the login screen
    package com.Trish.diabetesapp;
    import android.os.Bundle;</p>

<pre><code>import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;

import android.R;

import android.os.StrictMode;
import android.util.Log;
import android.widget.EditText;

public class Login extends Activity {
    Button button2;

@Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_login);
    EditText breakfast= (EditText)  findViewById(R.id.breakfast) ;
        EditText lunch = (EditText) findViewById(R.id.lunch);
        EditText dinner = (EditText) findViewById(R.id.dinner);
        EditText supper = (EditText) findViewById(R.id.supper);
        Button button = (Button) findViewById(R.id.button1) ;

        final String breakf = breakfast.getText().toString();
        final String lun = lunch.getText().toString();
        final String din = dinner.getText().toString();
        final String sup = supper.getText().toString();
button2=(Button)this.findViewById(R.id.button2);
button2.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
   // generate your params:
   List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;();
   nameValuePairs.add(new BasicNameValuePair("breakfast", breakf));
   nameValuePairs.add(new BasicNameValuePair("Lunch", lun));
   nameValuePairs.add(new BasicNameValuePair("Dinner", din));
   nameValuePairs.add(new BasicNameValuePair("supper", sup));

   // send them on their way
   try {
       DefaultHttpClient httpClient = new DefaultHttpClient();
       HttpPost httpPost = new HttpPost("http://xyz/register.php");
       //httpPost.setEntity(new UrlEncodedFormEntity(nameValueParams));

       HttpResponse httpResponse = httpClient.execute(httpPost);
       HttpEntity httpEntity = httpResponse.getEntity();

   } catch (UnsupportedEncodingException e) {
       e.printStackTrace();
   } catch (ClientProtocolException e) {
       e.printStackTrace();
   } catch (IOException e) {
       e.printStackTrace();
   }
}});}
//@Override
        //public void onClick(View v) {
//finish();
//System.exit(0);
//}
//});
//Intent intent = new Intent(Login.this, .class);
//Login.this.startActivity(intent);
//new lister for save start db code their
//take info from button with sql




  // @Override
  // public void onClick(View arg0) {
       // TODO Auto-generated method stub
       //postData();
//});

   //
//}

@Override
    public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.main, menu);
        return true;
} 
</code></pre>

<p>here is the   xml
    
    </p>

<pre><code>    &lt;uses-sdk
        android:minSdkVersion="10"
        android:targetSdkVersion="10" /&gt;

    &lt;application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" &gt;
        &lt;activity
            android:name="com.Trish.diabetesapp.MainActivity"
            android:label="@string/app_name" &gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN" /&gt;

                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;
        &lt;activity
            android:name="com.Trish.diabetesapp.Login"
            android:label="@string/title_activity_login" &gt;
        &lt;/activity&gt;
    &lt;/application&gt;

&lt;/manifest&gt;
</code></pre>
