Eclipse does not create R.java and gen folder

I had to share this problem with you because I lost all morning around this. So what was my problem? Suddenly, Eclipse refuses to generate R.java and creates a gen folder. I tried all sorts of solutions that I came across on stackoverflow and some blogs:

  • Clear project and rebuild
  • Clear project with automatic assembly, and then rebuild
  • Create a gen folder
  • Create gen folder with R.java dummy
  • Copy the gen folder from the project used in another project (different workspaces)
  • Validate all my .xml files

Nothing worked ... So, what was the solution? I will answer myself.

+4
source share
2 answers

Verification of the SDK manager worked for me. Android Build Tools seems to be missing: / Strange behavior from an eclipse ...

enter image description here

After installation, everything worked as expected. So here is another solution ...

Hope this works for you
Be careful.

+16
source

I spent about an hour on it ... In my case, it was from a file in drawables containing - .

Eclipse cannot tag your files with invalid characters.

check your dropdown folders and files in them. You can also check other folders with resources or something like that. This problem may be caused by incorrect (unsupported) characters in some file names.

+3
source

Source: https://habr.com/ru/post/1482978/


All Articles