Quantcast
Channel: Active questions tagged crash - Stack Overflow
Viewing all articles
Browse latest Browse all 7191

Android application crashes after implementing this line of code

$
0
0

My application crashes after implementing this line of code.I think the problem is with this line of code:

public void przekaz() {    String st1 = edittext1.getText().toString();    String st2 = edittext2.getText().toString();    String st3 = edittext3.getText().toString();    String st4 = edittext6.getText().toString();    Intent intent1 = new Intent (this, MainActivity2.class);    int RadioId = radiogroup.getCheckedRadioButtonId();    radiobutton = findViewById(RadioId);    String radio1;    radio1 = radiobutton.getText().toString();    intent1.putExtra("klucz1", st1);    intent1.putExtra("klucz2", st2);    intent1.putExtra("klucz3", st3);    intent1.putExtra("klucz4",st4);    intent1.putExtra("klucz5", radio1);    startActivity(intent1);}

The applications works normally after I delete:

int RadioId = radiogroup.getCheckedRadioButtonId();radiobutton = findViewById(RadioId);String radio1;radio1 = radiobutton.getText().toString();

Any ideas?


Viewing all articles
Browse latest Browse all 7191

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>