0

What may be the issue that while Importing content R.menu.content and clicking on issue resolver there is no project R visible, only the android.R one. I might add that there is no project resources import yet in the file, and resource do exist.

enter image description here

Regards

Jacob
  • 14,949
  • 19
  • 51
  • 74
  • possible duplicate of [R cannot be resolved - Android error](http://stackoverflow.com/questions/885009/r-cannot-be-resolved-android-error) – Phantômaxx Oct 02 '14 at 15:29
  • This is normally due to having an error in 1 or more of your resources - fix any of these resource errors fist and then your R can be generated. – deive Oct 02 '14 at 15:35

3 Answers3

0

Generally, each time whenever there's a problem with R not been generated, or even disappeared, its because due to some problem in the XML layout file that prevented the application from being built. Please check your res folder and fix any error that are present in that first for the R file to be generated.

Antrromet
  • 15,294
  • 10
  • 60
  • 75
0

Check your resources,fix errors then goto project and clean project and make sure build automatically is selected.Restart IDE.Your problem will be solved.

KKGanguly
  • 323
  • 3
  • 13
0

This is usually due to a subtle error in the project.Things that you could check in order of priority:

  1. As previously mentioned by Antromet, check your xml files (layout, animations, resources etc. . . ) for any error.

  2. Check your packaging. For example your R could be generating under your primary package com.example.main.package But you are trying to import R from com.example.secondary.pacakge So it may not find R. Try manually typing to confirm.

  3. Ensure all your external references are building. I have had R refuse to generate because an external library I was referencing got deleted.

Filipe Teixeira
  • 3,565
  • 1
  • 25
  • 45