裝了極光推送后會閃退
public class Login extends Activity {
private Button btn1;
private Button btn2;
?@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.login);
btn1=(Button) findViewById(R.id.button3);
? ? ?btn1.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View arg0) {
Intent i=new Intent(Login.this,MainActivity.class);
startActivity(i);
}
? ? ?
? ? ?});
? ? ?btn2=(Button) findViewById(R.id.button4);
? ? ?btn2.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View arg0) {
Intent i=new Intent(Login.this,Enroll.class);
startActivity(i);
}
? ? ?
? ? ?});
? ? ?JPushInterface.setDebugMode(true);
? ? ?JPushInterface.init(this);
}
}
這樣不對么?
2016-08-08
你把
JPushInterface.setDebugMode(true);
? ? ?JPushInterface.init(this);
這兩句放到setContentView(R.layout.login);下面試試