You never "closed" lambda for the start_button
click listener. Add a closing curly brace }
:
...
text_id.text = "my text"
} // <- this one's missing
you have to declare the variables and you should identify the view by id before using them as below.
TextView message_text;
Override fun onCreate(savedInstanceState: Bundle?){
Super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main);
message_text = (TextView) findViewById(R.id.message_text);
message_text.setText("abc");
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.