How to find out why the file "R" (resource) is not generated?

Again and again, I mean that during the development of the Android SDK, it does not suddenly restore the “R” file. Usually this is due to some error in one of the many .xml files, but this dash does not indicate neglect, as WHY he suddenly refuses to regenerate this file.

There are no errors or warnings listed for any of my .xml files, and manually checking all of these (at that time almost hundreds!) XML files for errors is also not fun!

Is there any option or magazine or something that will allow you to find the problem faster and faster? Last time, I had to do a long binary search (for example, copying and deleting files to / from a second test project), trying to find the offending file. This is truly a nightmare, and not how it should be in any decent SDK that deserves this name!

+5
source share
6 answers

sometimes this can happen if the “invalid” file is located under the res folder or its subfolders. Do you see an error message in the console window?

+4
source

, SDK: . , . , , .

+2

, xml !

R- " " eclipse.

0

intellij. , , .

  • , R.java.

eclipse, , intellij. - , intellij?

0
source

Open the Android SDK Manager and make sure that the Android SDK build tools are installed. Somehow it removed me.

After restarting Eclipse, class R was created.

0
source

Check file timestamp?

-1
source

All Articles