I am having a problem with the code below
setContentView(R.layout.activity_main);
TextView myLocation = (TextView)findViewById(R.id.txtAddress);
myLocation.setText("123 Main St New York, NY");
Linkify.addLinks(myLocation , Linkify.MAP_ADDRESSES);
mainLayout.addView(myLocation);
My problem is with the part that says
mainLayout.addView(myLocation);
it is complaining that "mainLayout cannot be resolved" that is the exact error that it is saying what i have put into the quotes.
does anyone have a suggestion on how to fix this?