简体   繁体   中英

Android- R.java file not found

While working with an android project .I'm stuck with R.java file which is not found even I clean the project(project---->clean).But that file still not found .Even I create a new project the same problem occurs . what I need to do ? I'm expecting the valuable replies from which I could overcome this problem

R.java is missing implicate that your resource folder is having some issues. please try to look at your resource files(layout,drawable etc). and after that clean the project. it will solve the problem for sure.

Have you checked that your builders are set up correct? To have the R.java file generated there's a need that the Android Pre-Compiler has processed all the resources.

In Eclipse go to "Project --> Properties" and select "Builders" from the list.

Android Builders

Only if these builders are set, the R file can be generated.

R.java missed only when there is some problem in resource files. Check properly your Menu files , layouts, and Drwables, (sometime same image names with .jpg and .png extensions are existeing).

Or you can create new project and paste everything in new project then check it again.

  • click Project --> Build Automatically
  • check build automatically
  • clean the project

simple way! go to import section (top of current java class) and remove wrong import R, then go over the R and click Alt+Enter, then android studio import true R.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM