R class was deleted by Eclipse after Clean Project

This is the weirdest thing I've seen in Eclipse. When I started my Android project, I forgot to select the main view class, and the one I had was selected main.xml, since you probably know that I got the file main.out.xmlgenerated by Eclipse. To solve this problem, I chose Project> Clear, but after that my class Rin gen/disappeared. Does anyone know how to get it back and / or how to avoid it? Thanks in advance.

+3
source share
3 answers

The R class is generated every time you recompile the project (if changes are necessary), and you should not worry about it. Moreover, you should not even transfer the R file to your version control system, since it must be generated during the build process.

I advise you to check the "compile before launch" box (eclipse should have it in the launch configuration), so the R file will be restored before the application starts.

+2
source

Eclipse is well known for such issues. If Project> Clean does not help, try restarting the IDE.

I really recommend using IntelliJ IDEA, although I have been using Eclipse for many years and then switched to IntelliJ, which is a relief ...

http://blogs.jetbrains.com/idea/2010/10/intellij-idea-10-free-ide-for-android-development/

0

, Eclipse R-.

0
source

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


All Articles