简体   繁体   中英

Eclipse Crash and Not Regenerate R.java

I know this question has been asked & answered before. But, none of those answers work for me. Eclipse crashed in the middle of a build and keeps erasing the R.java file. I have tried to clean and rebuild. Does not help. I was using SDK build tools 19.0 upgraded to 20.0. Does not help. I didn't touch anything in the XML files and I do not see any errors in the XML files.

尝试另一个IDE,例如Idea ,检查这是否是由于Eclipse故障而不是您最近更新的SDK引起的

I my case there was something wrong with my XML usually my layout files, when you have a problem in your XML files the clean option does not work properly, check your XML files ( layout and manifest ) and after that clean your project.

Hope this help you

I did get my R.java back. There was a jpeg for another project stuck in a drawable directory. Don't know how it got there. and, still lots of unexplained errors though.

All my other errors were from switch statements using R.something_menu.icon for cases handling user responses. I got a message that as of ADT 14, switch statements can no longer be used. I had to migrate to if...else It works. Don't know why. But, it solved the problem & saved my code.

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