R file is missing android

后端 未结 14 1843
春和景丽
春和景丽 2020-11-30 14:11

i was using Eclipse Helios but due to performance issues i changed to Eclipse Galileo and installed the ADT plugging, and added my sdk folder to Elcipse Preferences. Now R.j

14条回答
  •  旧巷少年郎
    2020-11-30 14:49

    Sometimes when you clean your project the R file disappears, I had the same issue.

    The way I fixed it was:

    -Make sure all the "import android.R" was removed -Clean again (if this doesn't fix it, restart eclipse and try again)

    Or

    -Put the pointers to R file in comment f.e. // setContentView(R.layout.main); -If all the pointers to R file are in comment, you should get only warnings in the file, and hopefully errors somewhere else. -Fix the errors and then uncomment the pointers. Sometimes eclipse ignores some errors and drops the R file and then says nothing about it, which is annoying, but this will fix it. :)

    -If this still doesn't work, you can try create a new project and copy paste your code in it.

提交回复
热议问题