0

My app suddenly has come up with lots of errors when trying to compile and push onto my phone. I get errors such as this one:

java: C:\Users\Steven\workspace\RandomGenie\src\com\frostbytedev\randomgenie\Menu.java:15: cannot find symbol
symbol  : variable layout
location: class com.frostbytedev.randomgenie.R

The problem is in the source code there are no errors showing and nothing is underlined. What could be causing this and any quick fixes?

3
  • 1
    Remove the line import com.frostbytedev.randomgenie.R from any files that have it Commented Jun 22, 2013 at 19:57
  • No files have that line. Commented Jun 22, 2013 at 20:10
  • 1
    Do you have any errors in your XML files? Commented Jun 22, 2013 at 20:11

2 Answers 2

1

check all your xml files in the res folder.... make sure there aren't any errors in them, when you make a change please ctrl+s then click project and select clean, check the build project as well. also you could restart your IDE.

Sign up to request clarification or add additional context in comments.

Comments

0

If you try and compile or build your project while the XML file has errors your R.java file will not be created. Look in the gen folder and I can almost guarantee there is no R.java file. Search your XML files for an error. If you find that, post it or fix it then your app will compile and run again.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.