factTextView =(TextView) findViewById(R.id.factTextView); showFactButton=(Button) findViewById(R.id.showFactButton);
can anyone help this code is saying cannot resolve symbol 'factTextView'. it is showing red text (Android track)
Hi Thomas. Did you declare your 2 variables at the top of the class (under the class name)?
private TextView factTextView; private Button showFactButton;
If you have, then just paste your code here so we can help you further. Thanks :)
Seth KrogerTreehouse Moderator 56,218 Points
Also, if the red text is for the R.id.factTextView part make sure the id in the layout file is spelled correctly and that there are no errors in the XML.