Search code examples
androidandroid-studioprogram-entry-point

error: cannot find symbol variable main


I have tried to make a project with help of this tutorial: http://www.tutorialspoint.com/android/android_php_mysql.htm I have created all the necessary files, but I get the following error.

Cannot resolve symbol 'main'

I have tried to solve this by importing android.R, cleaning/rebuilding project, syncing project with gradle files. I have also checked XML files, these are without error.


Solution

  • The tutorial you are referring to has missed to include the menu file 'main' under the menu folder.. Include main.xml in your menu folder (if it doesn't exist, create one under resources directory).