求助,我在Button控件上加setOnClickListener程序就闪退
package com.example.administrator.pactice_intent;import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity extends AppCompatActivity {
private Button next;
@Override
protected void onCreate(Bundle savedInstanceState) {
next = (Button) findViewById(R.id.next);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
next.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view)
{
}
});
}
}