0

I updated tools in my Eclipse first by going to Help->Check For Updates and installing everything i that it suggested. Then by going to Window->Android SDK Manager and updating multiple things including my SDK version.

After I have finished my update all my Android projects got a nice red box with an x inside it. I explored the projects and noticed that none of them had any errors inside the project just the project itself had the error icon. I searched online and i found that other people had similar problems. So i thought i found the solution. Alas after cleaning and building the project I got additional error icons next to multiple java files in my projects. Eclipse cannot locate the automatically generated R files when it tries to import them and all the imports are selected red.

I tried deleting the whole content of .android directory (starting with specific few files then the whole content) but that did not bring desired results.

So i have deleted the newly generated files and restored all the old ones.

When I clean and build the projects again all the errors disappear but only until I try to run the project again and then same error appears:

Your project contains error(s), please fix it before running it.

I have also found a related question. It claims that there must be a problem with my xml files. I did not modify any of my xml files since updating the tools so I dont know what could cause them to have errors.

Any ideas as to what is going on??

Community
  • 1
  • 1
Xitcod13
  • 5,949
  • 9
  • 40
  • 81
  • please leave a comment with an explanation to why this is a bad question before you will vote down a question. It helps a lot – Xitcod13 Jul 15 '12 at 00:03

3 Answers3

1

I've found that eclipse is now picking up errors that it didn't pick up before, because they updated lint, you may have to check all your files and see if there is an error because of this, if it doesn't work try removing Android from the build and reattach it, clean the project, build project, make sure the activities are using the right R files and check what lint says, its like a little square with a tick in it I think.

FabianCook
  • 20,269
  • 16
  • 67
  • 115
  • thanks a lot for your suggestion. One of my projects shuts-down unexpectedly after the update but now others seem to work fine. I dont know how the problem fixed itself. – Xitcod13 Jul 07 '12 at 22:27
  • 1
    Hmm. The ADT seems to work in odd ways right now. I like some things about it. But other things are just annoying. And the bugs are just out of this world. – FabianCook Jul 07 '12 at 22:29
  • Yeah TON's of bugs. It was working 100% before not it's just crap. – Oliver Dixon Jul 13 '12 at 17:12
  • You should go back and use an older ADT plug in with it and then use and older eclipse as well. I use juno and im not sure if its that or the ADT plug in. – FabianCook Jul 14 '12 at 00:13
1

I had exactly the same problem, solved by removing any imports of R in my code and then cleaning the project

DrJimbo
  • 45
  • 1
  • 7
0

Strangest thing just happened. Even though I have done this 2 times before I have again deleted all my files in .android folder exited my Eclipse and opened it back up again. All the errors were gone and most of my projects work correctly. I have spend a lot of time on this problem and i dont know how it got resolved but Im glad its working again.

Xitcod13
  • 5,949
  • 9
  • 40
  • 81