I am posting this as a new question, although I have managed to find the solution to the problem myself, and despite the fact that the question has been asked before, either directly or indirectly. I mention the following posts at StackOverflow as examples:
stackoverflow.com/questions/39872779/extra-message-and-putextra
stackoverflow.com/questions/38938297/android-studio-cannot-find-symbol-variable
The reason for doing this post, is that the issue seems to be a recurring pitfall among beginners (myself included) who follow the guide "Building Your First App" by Android Developers. It seems difficult to find the answer explaining specifically why the problem arises. I spent several hours plundring in Android Studio and searching online, until I found the answer.
Description of the problem:
While having followed the step "Start Another Activity", thus attempting to run the application, you may experience Build error, with the following message:
"error: cannot find symbol variable EXTRA_MESSAGE"
In addition, instances of EXTRA_MESSAGE are colored red in the programming code in Android Studio.
It can be hard to understand why this error occurs when you have followed the description in the guide to the best of ability. A brief answer that have been given a number of times is that you have not declared the EXTRA_MESSAGE variable as public static in the MainActivity. But this provides no explanation of how the declaration should have been performed (syntax), or how you have managed to avoid the declaration in the first place.