title: Trying to run this out..no compile error..but it is not running on my device please solve it?
body: <p>This is the java code , as i intend to create a login page.
  The code is compiling perfectly. When i used my andriod device to run in it it isnt working at all??
  The apk is installing but the GUI is not opening..please solve this error?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>package com.example.logindetails;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.net.Uri;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.view.View;
  import android.widget.Button;
  
  public class MainActivity extends Activity {
  
   @Override
   protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    Button mButton = (Button) findViewById(R.id.button1);
    Button mButton1 = (Button) findViewById(R.id.button2);
    mButton.setOnClickListener(new View.OnClickListener() {
  
     @Override
     public void onClick(View v) {
      Intent intent = new Intent(Intent.ACTION_VIEW, Uri
        .parse("https://www.facebook.com"));
      startActivity(intent);
  
     }
  
    });
    mButton1.setOnClickListener(new View.OnClickListener() {
  
     @Override
     public void onClick(View v) {
      Intent intent = new Intent(Intent.ACTION_VIEW, Uri
        .parse("https://twitter.com/login"));
      startActivity(intent);
  
     }
    });
   }
  
   @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;
   }
  
   @Override
   public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();
    if (id == R.id.action_settings) {
     return true;
    }
    return super.onOptionsItemSelected(item);
   }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@android:color/primary_text_light"
      android:orientation="vertical" &gt;
      
      &lt;ScrollView
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"&gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal" &gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="UserName"
              android:textSize="20sp" /&gt;
  
          &lt;EditText
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:textSize="20sp" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal" &gt;
  
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Password"
              android:textSize="20sp" /&gt;
  
          &lt;EditText
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:password="true"
              android:textSize="20sp" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:text="Forgot Password?"
          android:textSize="15dp"
          android:textColor="@android:color/darker_gray"
          android:textStyle="italic" /&gt;
  
      &lt;Space
          android:layout_width="wrap_content"
          android:layout_height="20dp" /&gt;
  
      &lt;LinearLayout
          android:id="@+id/lay1"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:gravity="center"
          android:orientation="horizontal" &gt;
  
          &lt;Button
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:background="@android:color/holo_blue_dark"
              android:text="Login"
              android:textColor="#fff" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:text="OR"
          android:textSize="20dp"
          android:textStyle="normal" /&gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:gravity="center"
          android:orientation="horizontal" &gt;
  
          &lt;Button
              android:id="@+id/button1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:background="@android:color/holo_blue_dark"
              android:text="Login with Facebook"
              android:textColor="#fff" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:text="OR"
          android:textSize="20dp"
          android:textStyle="normal" /&gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:gravity="center"
          android:orientation="horizontal" &gt;
  
          &lt;Button
              android:id="@+id/button2"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:background="@android:color/holo_blue_dark"
              android:text="Login with Twitter"
              android:textColor="#fff" /&gt;
      &lt;/LinearLayout&gt;
          &lt;Space
          android:layout_width="wrap_content"
          android:layout_height="30dp" /&gt;
      
      
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:text="Not a Member?"
          android:textSize="15dp"
          android:textColor="@android:color/darker_gray"
          android:textStyle="normal" /&gt;
          &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:gravity="center"
          android:orientation="horizontal" &gt;
  
          &lt;Button
              android:id="@+id/button3"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:background="@android:color/holo_blue_dark"
              android:text="Sign Up"
              android:textColor="#fff" /&gt;
      &lt;/LinearLayout&gt;
      &lt;/ScrollView&gt;
      
  
  &lt;/LinearLayout&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>Please solve the error??</strong></p>