Вопрос

I'm developing an Android application on Eclipse Juno, and using a MAC OS Lion. When I fix some error in a xml file the error mark doesn't disappear, and it doesn't let me compile the code even if I fix it. I tried deleting it through Window-> Show View -> Problems , but when i compile the code, the error came back. The only way i figured out to solve it is to crop all the content in the file, save the xml without errors and then paste the same code inside the xml file again, the error just go away as if there wasn't anything there. Does anyone now why it happens?

Это было полезно?

Решение

Grahaminn is correct in that seeing the code would be helpful in case there is something that you are missing. However, since you say that it goes away once you cut, save, and paste, I believe you did take care of the error. While I've never found an answer to the same question other than the eclipse compiler obviously has bugs, I have had the same thing happen and have had to resolve the issue in the same way. The compiler, for whatever reason, still sees the error instead of the fix. It is very frustrating but we are stuck doing what you have done until the compiler is fixed.

Другие советы

Update your Android development tools. That bug (Android Lint issues remain even after correcting them) was fixed in ADT 20.0.2.

If you can't or don't want to upgrade, you have the options of

  • cleaning the project
  • manually running Android Lint again.

But similar errors will occur again from time to time then.

Thanks for all the answers. My Eclipse is working properly at least until now, the only thing with still giving me headaches is the R.java file which keep disappearing sometimes , but thats due to problems with ADT i guess. I uninstalled the ADT plugin and installed it again.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top