3

I suddenly have an error in my Android eclipse project. This is after a hard shutdown while running eclipse, so that may have something to do with it. I clean the project and then do a build. I get the following error on the BuildConfig.class file that is autogenerated in the /gen dir:

The type android.content.Context cannot be resolved. It is indirectly referenced from required .class files

I did notice that in my build configuration the JRE was stated to be missing. I have since fixed this problem, but still get the error. Help!

Patrick Jackson
  • 18,766
  • 22
  • 81
  • 141

1 Answers1

6

I was able to fix the problem by going to "Fix project properties". Right click project-->android tools.

Do not know what caused this error.

Patrick Jackson
  • 18,766
  • 22
  • 81
  • 141
  • 1
    FWIW, I also had this problem when compiling an Android project library in Eclipse after a BSOD, but also after copying an existing project that uses that library. I don't know which caused the problem, but I didn't notice anything until I copied the project. Anyway, rather than trying Fix project properties, I just exited Eclipse and then re-started it. The problem went away. It may be that on coming up Eclipse does the equivalent of a "Fix project properties." If that is true, then it may have been the copy project that caused the issue, since it was started after the BSOD and looked OK. – Carl Nov 18 '12 at 02:46