Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2
Try this: So I deleted the "setContentView" in the on click method and I added a space before the "findViewById". If this doesn't work please show me the copy of your xml file @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } public void onButtonClick(View v){ TextView t2 = (TextView) findViewById(R.id.textView2); t2.setText("LITTERALLY ANYTHING"); } }
9th Jan 2017, 7:43 PM
ein siedler
ein siedler - avatar
+ 2
OK perfect then
9th Jan 2017, 7:44 PM
ein siedler
ein siedler - avatar