Home>

MainActivity.java

import android.content.Context;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ListView;
public class MainActivity extends AppCompatActivity {
    private Button newCreate;
    @Override
    protected void onCreate (Bundle savedInstanceState) {
        super.onCreate (savedInstanceState);
        setContentView (R.layout.activity_main);
        newCreate = (Button) findViewById (R.id.button);
        newCreate.setOnClickListener ((View.OnClickListener) this);
    }
    public void onClick (View v) {
        if (v == newCreate) {
            Intent intent = new Intent (this, NewCreateActivity.class);
            startActivity (intent);
        }
    }
}

I want to move using Intent.
It will be forcibly terminated. Where should I improve?

<activity android: name = ". NewCreateActivity" />


I have added to the manifest file.
For the move destination, only layout is set with onCreate.