crash when i click a button : I have a button to get to a new Activity, but the app crash when i click on it. what can i do to fix this. This is the code i juse for opening the Activity

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-js -->

    package no.vfk.vfkhakkespettboka;

    import android.content.Intent;
    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;
    import android.view.View;
    import android.widget.Button;

    public class Programvare extends AppCompatActivity {

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_programvare);

            Button home = (Button)findViewById(R.id.home);
            home.setOnClickListener(new View.OnClickListener() {

                @Override
                public void onClick(View v) {
                    Intent startIntent = new Intent (getApplicationContext(), MainActivity.class);
                    // Show how to pass Information to another Activity
                    startActivity(startIntent);
                }
            });
        }
    }

<!-- end snippet -->

